Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: determining client's IP Address



Thanks! I managed to get the IP address by getting the "x-forwarded-for" header content. The application will be used within the LAN, so far the method is working.

Anna
On Wednesday, February 4, 2004, at 02:02 AM, Daniel Hedrick wrote:

Quoting Natalia Sudiono <email@hidden>:
I'm trying to get the client's IP
Address. I have tried using the method request.getRemoteAddr(), but
what I got was the proxy server's address. Is there a way to get the
client's IP address?

Not using the HttpServletRequest API, and unless the proxy server tacks
it into the request headers, you're probably out of luck.

Check the enumeration returned from HttpServletRequest.getHeaderNames()
for potential headers.

Good luck!

-daniel

--
Do your kids need more space?
Get Low-cost Loft Bed Plans!
http://loft.hedrick.org/
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.