There is no way to detect the contextPath on servletInit. It can only be done after the first request. (Using HttpServletRequest.getContextPath())

-Tim

[EMAIL PROTECTED] wrote:
Hi,

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.


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

Reply via email to