Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

IP address look up from the request

843842Mar 9 2009 — edited Mar 13 2009
Hello,

I want to allow access to the administration part of my web application from a set of IP addresses which are specified in a properties file. I want block all other access.

How can I find out the IP address of the system via servlet. Is it possible to get it from the HttpServletRequest object.. I have tried request.getRemoteAddr(). But it returns something different

Any help would be appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2009
Added on Mar 9 2009
4 comments
180 views