Take a look at the HttpServletRequest.getRemoteAddr() method (which is
inherited from ServletRequest). I *think* this is doing what you want.
However, you should be aware that if the client is behind a firewall or
proxy, many, many clients will have the same IP address, so it cannot be
used for any kind of unique identifier. That is, at any point in time,
hundreds of users within the company I work at are accessing the Internet,
but because we are behind a firewall that is acting as a proxy, we appear to
have the same IP address.
----- Original Message -----
From: Jonathan Silvergran, SM3OJR <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 07, 2001 10:36 AM
Subject: Pulling out users IP-number
> Greetings,
>
> Is it possible to somehow extract the IP number of the accessing browser's
computer from a servlet?
> If so, how?
>
> Any hints appreciated.
> Thanks
> Jon
>
>
___________________________________________________________________________
> 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