To all,

I am writing a webapp which runs under tomcat 6.0.18 and I am new to
java. My webapp is configured to load on startup and in the init
method/function I want to get the list of IP addresses and ports that
can be used to connect to my web-app. I cannot use the
HttpServletRequest or ServletRequest because this assumes a connection
has come in and I want this information before any request can come
in.

Is there a way from my web-app, to get a list of IP addresses and
ports that tomcat is listening on? Other java programmers I know
mentioned using JMX, etc but that assumes I know the JMX port, which
could change.

      java.net.InetAddress inetAddress = java.net.InetAddress.getLocalHost();
seems to get me the IP address, but I have not found a way to get the port.

thanks
Len

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to