tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Ince" <>
Subject Can I get the webapp context path from the init method of a servlet
Date Sat, 26 Jul 2003 05:51:41 GMT
I am trying to get the context path from the javax.servlet API  for a
servlet when it is being initialized (init) and not when it is invoked (not
via service, doGet, doPost ..).
I know that I can get it from the request.getContextPath() method but this
can only be done when the
servlet is invoked.

public class MyServlet extends HttpServlet {
   public void init(ServletConfig config) {
       // get context path for this servlet



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

View raw message