try InetAddress.getByName(request.getRemoteAddr()).getHostName()

Emma

-----Original Message-----
From: randie ursal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 05, 2002 3:18 PM
To: [EMAIL PROTECTED]
Subject: Re: about getRemoteHost


i want the clients hostname...not server hostname.

but getRemoteHost returns IP address of client not its dns hostname.

why is this?

Emmanuel Eze wrote:

>use getServerName() if u want the server's ip address
>
>-----Original Message-----
>From: randie ursal [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, September 05, 2002 2:54 PM
>To: [EMAIL PROTECTED]
>Subject: about getRemoteHost
>
>
>hi,
>
>    sorry for this newbie question...
>
>        why is getRemoteHost() of HttpServletRequest return the
>    IP address of the client accessing my servlet and not the machine
>    assign dns hostname?
>
>thanks
>   randie
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to