This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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?
 
Similar Threads
How to get client's IP address, Domain using Java
trying to connect to another ip adress
Tomcat HttpSession inactivity
how to get the client's bowser URL who's hitting your service from ajax call?
Getiing Server IP address