I am trying to print the IP adress of the logged user in my webApplication. If a user connects from another PC (which is under the same network, as the web application is ru
As we move over to IPv6 from IPv4, they are changing the loopback address (localhost) to 0:0:0:0:0:0:0:1 from 127.0.0.1 thats why you are getting this address.
As for the functions:
getRemoteAddr() returns the clients IP
getLocalAddr() returns the IP of the server the application is
running on