tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brendan MacLean" <>
Subject Re: ServletContext.getContextPath()
Date Wed, 03 Oct 2007 20:05:43 GMT
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?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message