You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brendan MacLean <br...@labkey.com> on 2007/10/03 22:05:43 UTC

Re: ServletContext.getContextPath()

It looks like the method ServletContext.getContextPath() was added in
version 2.5 of the Servlet API (supported by Tomcat 6.0), but was not
present in version 2.4 (supported by Tomcat 5.5).  Is there any way to get
this information at webapp load time, i.e. inside a
ServletContextListener.contextInitialized() function (or any time before the
first request) in Tomcat 5.5?

I'd really love to have the context path before the first request, but can't
yet force our user base to upgrade to Tomcat 6.0.  Thoughts?

--Brendan