We have a need to determine the server's URL. I know one can use JEE Dependency Injection for resources into servlets like this:
@Resource
private UserDatabase userDatabase;
I was curious if it possible to inject Host configuration, or something similar where I can figure out the entire local URL for the server.
I'm aware I can examine httpServletRequest, but I need to do this on boot of the container, so I would be outside the scope of a request and unable to use that api.
Thank you for any help!