Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get user's IP address

Status
Not open for further replies.

pujji

Programmer
Jul 26, 2001
10
US
Hi friends,

How to get the user's IP address using JSP. Please send the code block.

Thanks
 
Code:
request.getRemoteAddr()
This returns a String representing the IP address of the client machine.

Note: This may or may not be the user's "real" address. You will be getting the IP where the request originated. It could be a NAT address or a proxy server.
Wushutwist
 
Thank you wushutwist, your reply helped me a lot.

Thanks once again

pujji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top