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!

Fetching the IP of the Client

1152968Nov 25 2014

Hi Team,

I am trying to fetch the IP of the user using the below snippet but it is giving some private network IP instead of the user in production.

request.getHeader("x-forwarded-for");

Can u please help me why I'm getting different IP than original.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 23 2014
Added on Nov 25 2014
0 comments
640 views