Milt Epstein wrote:
>
> > Myself, I have no problem with getRemoteAddr(), but getRemoteHost()
> > returns nothing.
>
> In all cases? That could be a bug with your servlet container.
>
Often web servers turn off name lookup, since it can be very
expensive. getRemoteHost() is supposed to be equivalent to
the CGI variable REMOTE_HOST. So not returning anything useful
is allowable behavior.
The 2.3 spec says:
getRemoteHost()
public java.lang.String getRemoteHost()
Returns the fully qualified name of the client that sent
the request, or the IP address of the client if the name
cannot be determined. For HTTP servlets, same as the value
of the CGI variable REMOTE_HOST.
It might be possible to force a name lookup by using the
java.net.INetAddress routines.
-cks
___________________________________________________________________________
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