This week's giveaway is in the Groovy forum.
We're giving away four copies of Groovy Fundamentals video training course and have Ken Kousen on-line!
See this thread for details.
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


Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
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.
 
Consider Paul's rocket mass heater.
 
subject: Determining client ip in servlet?