0

My app runs on a jetty server. I access it via http://localhost:8080. My problem is that Page.getCurrent().getWebBrowser().getAddress() returns 0:0:0:0:0:0:0:1 instead of something like 127.0.0.1 as stated in the javadoc:

/**
 * Gets the IP-address of the web browser. If the application is running
 * inside a portlet, this method will return null.
 * 
 * @return IP-address in 1.12.123.123 -format
 */
public String getAddress() {
    return address;
}

Anyone has a clue what happens here?

OddDev
  • 3,644
  • 5
  • 30
  • 53
  • 2
    Possible explanation: http://stackoverflow.com/questions/17964297/using-request-getremoteaddr-returns-00000001 – Mateusz Stefaniak Jun 24 '16 at 07:52
  • Additionally, if you really need to, you can force to ipv4 with `-Djava.net.preferIPv4Stack=true`. Refer to the [java IPv6 guide: IPv6-Related System Properties](http://docs.oracle.com/javase/8/docs/technotes/guides/net/ipv6_guide/#ipv6-related) for more information – Morfic Jul 19 '16 at 12:56

0 Answers0