tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject ServletContextListener - how to detect http path of web application?
Date Wed, 21 Dec 2005 10:54:24 GMT

Apols for a newbie question, I didn't have much luck with the archives
or in Google.

In my ServletContextListener.contextInitialized method, I need to detect
the public http path of my web app.
i.e. http://servername/approot/

How can I do this?
event.getServletContext().getResource("/") gives me "jndi:/localhost/",
not very helpful.

Appreciate any advice.

Iain Shepherd

For more information about Barclays Capital, please
visit our web site at

Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message