File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes IP Address Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "IP Address" Watch "IP Address" New topic
Author

IP Address

Samuel Lugo
Greenhorn

Joined: Feb 28, 2005
Posts: 24
Hello,
Does anyone know how to get the IP address of the client hitting a servlet/JSP? Thanks for the help.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Look through HttpServletRequest for getRemote... and see if any will do the job.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Samuel Lugo
Greenhorn

Joined: Feb 28, 2005
Posts: 24
Yep, request.getRemoteAddr(). Thanks a bunch.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Nice work Stan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IP Address