wood burning stoves*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "IP Address" Watch "IP Address" New topic

IP Address

Samuel Lugo

Joined: Feb 28, 2005
Posts: 24
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

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

Joined: Mar 06, 2001
Posts: 13459

Nice work Stan
I agree. Here's the link: http://aspose.com/file-tools
subject: IP Address
Similar Threads
Unknown Host Exception
SQL Server 2005 Connection using SQL Explorer 3.5 in Eclipse
Login in same user at the same time in different machine
Geo Blocking
public JDBC