In Java EE, how can I dynamically retrieve the full URL for my application?
For example, if the URL is "localhost:8080/myapplication/"
, I would like a method that can simply return this to me, either as a String or something else.
I am running GlassFish as application server.