Wondering how to programatically get the hostname that is in server.xml. I
suspect it is loaded into some object when Tomcat starts up, but I'm not
sure how to access it. What I want is the defaultHost attribute of the
Engine element.

I have the ServletContext object and in the debugger (Eclipse) it says that
servletContext is an ApplicationContextFacade object, but if I cast it as
that type of object, I get the error mentioned above.

I can see the hostname in the debugger variables by opening the
servletContext object, opening its context variable which is a
StandardContext object, then inside that is the hostname variable, but not
sure how to access it.

Ideas?

Thanks,
Brian Barnett
-- 
View this message in context: 
http://www.nabble.com/How-to-get-the-hostname-from-servlet-context-tf3838345.html#a10867804
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to