I'd like to obtain the host name of the server my web app is running on during the init() method of one of my servlets (without resorting to init params or system properties which could speak with false tongue).
Any clues? There doesn't seem to be any way to get this info from the servlet config or servlet context.
You can get this from a request (using getServerName()) but the init() method is, of course, called long before any requests are made.
Seems like this is certainly something that should be able to be determined, but I can't seem to find a way.
Any clues would be most appreciated!
thanks,
bear
Any clues? There doesn't seem to be any way to get this info from the servlet config or servlet context.
You can get this from a request (using getServerName()) but the init() method is, of course, called long before any requests are made.
Seems like this is certainly something that should be able to be determined, but I can't seem to find a way.
Any clues would be most appreciated!
thanks,
bear