This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Servlet returning remote address in IPv6 not IPv4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Servlet returning remote address in IPv6 not IPv4" Watch "Servlet returning remote address in IPv6 not IPv4" New topic
Author

Servlet returning remote address in IPv6 not IPv4

Michal Glowacki
Ranch Hand

Joined: Mar 14, 2006
Posts: 114
I can't find any help with these, also in history of this site. When I run my server Tomcat 6 on Windows 7/2008 my java code retrieves IPs in version 6, not 4. Is there any setting to disable this? I have turned off IPv6 protocol in network connections, I have disabled it in registry but still getRemoteAddr() returns IP6. Does anyone have similar problem?
Mac Luq
Greenhorn

Joined: Oct 02, 2009
Posts: 21

It seems that it's not related to your java server code

Look: http://stackoverflow.com/questions/3118829/why-request-getremoteaddr-returns-ipv4-or-ipv6-depending-on-context-post-query


SCJP 6 | OCPJWCD6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet returning remote address in IPv6 not IPv4
 
jQuery in Action, 3rd edition