It sounds like all you want is
request.getRemoteAddr()/request.getRemoteHost().  These give you the
IP/DNS-name of the client's box.  All of this is taken from the Socket
(since there really isn't any other way to get at it).

If you need to get the IP on your machine that they connected to, then you
can't.  request.getServerName() reports what was sent in the Headers.

"Peter Guyatt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi There,
>
> I am not too sure if you are actually able to do this but I have a need to
> get the IP address/hostname of the client that has accessed a page in our
> web application.
>
> This is mainly for security/auditing purposes, however I really need to
get
> the client Socket connection and not the ip address given in the
attributes
> of the HTTP header.
>
> Is there any way of obtaining a handle on the client socket that has
> connected to the server.
>
> Any help on this matter would be greatly appreciated.
>
> Currently we are using Tomcat version 4.1.18
>
> Many Thanks
>
> Pete Guyatt




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to