I need to find the currently active TCP/IP address (dotted Quad for IPv4) from a
Java program.
I don't see how to start finding it. Sure, you can always use localhost, but I want to actual assigned address, from the DHCP server. From that, I can query the DNS resolver and find the name.
Everything I've found starts with either the name or the numbers.
Clearly this can be done, as all of the J2EE/JEE5 containers can provide it, as something has to tell the container what the host is to have at the start of the container's Context
From that, its provided in HttpServletRequet's getRequestURL() function. But in my
testing, its always "localhost" and I want the real server name.
Thanks
Pat