This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

HttpServletRequest getRemoteAddr() has strange results  RSS feed

 
Ranch Hand
Posts: 249
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the development environment for a J2EE web app on my machine. On the login servlet I have a call to get the IP of the user using . Using the Chrome Browser, I have no problem, it returns a nice IP Address. However, using IE, Firefox, or Safari, I get a value like this: fe80:0:0:0:80f1:b54b:7e02:e24 - This only happens when I access the app from my local machine. A co-worker tried to access the application on my machine, and it worked fine, but he had the same problem in his own environment.

Has anybody seen anything like this. This is causing problems because without this particular part of code working, I can't test in IE, Firefox, or Safari, only Chrome.

Any assistance would be appreciated.

Thanks in advance for any help.

Mike
 
Saloon Keeper
Posts: 5279
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's an IP6 address, whereas the "nice looking" one is likely an IP4 address.
 
Mike Firkser
Ranch Hand
Posts: 249
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

It looks like we'll need to change our database to accept the larger IP values. Oh, the cost of progress.
 
Can't .... do .... plaid .... So I did this tiny ad instead:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!