Meaningless Drivel is fun!
The moose likes JSP and the fly likes how to get Client ip address ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how to get Client ip address ? " Watch "how to get Client ip address ? " New topic

how to get Client ip address ?

ozkan gumus

Joined: Sep 03, 2007
Posts: 7
Hi all ,

i have a server application running on Tomcat App. Server . i want to get the ip address of the client who send its requests by its browser ?
any suggestions ?
PS. Http headers does not contain Client ip .

thanks ,
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
Examine the JavaDocs for the javax.servlet.ServletRequest interface....
You will find the getRemoteAddr method.

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

You can find the API here:

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: how to get Client ip address ?
It's not a secret anymore!