ENVIRONMENT NetBeans 6.9.1, GlassFish 3.1
I have a Java web application. How to get server address and application name dynamically? A solution of “2in1” would be best for me: http://localhost:8080/AppName/ .
Is there a practical way to get this information?
EDIT . Let's say the AppName value is fixed, so I only need the host address. Is it possible to get it through JMX? Any other ways?
Thanks in advance, Daniel
Daniel Szalay
source share