aspose file tools*
The moose likes Servlets and the fly likes Determining client ip in servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Determining client ip in servlet?" Watch "Determining client ip in servlet?" New topic
Author

Determining client ip in servlet?

Michael Hildner
Ranch Hand

Joined: Oct 13, 2000
Posts: 297
Wondering if it's possible to determing the ip address of the client inside one of my servlets. I've used the HttpServletRequest.getHeader("user-agent") to find out the browser and OS. I'd like to do the same for ip.
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Michael,
Did you try this API?.
From Servlet API Doc :

regds
maha anna
[This message has been edited by maha anna (edited February 06, 2001).]
Michael Hildner
Ranch Hand

Joined: Oct 13, 2000
Posts: 297
Thanks Maha, I was looking in the wrong place as I was assuming it was in the header.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Determining client ip in servlet?