5 Replies Latest reply on Jul 13, 2006 2:53 PM by Adam Warski

    Filter and servlet mappings

    Adam Warski Master

      Hello,
      I have a servlet mapped to /*:

      <servlet-mapping>
       <servlet-name>myServlet</servlet-name>
       <url-pattern>/*</url-pattern>
      </servlet-mapping>
      


      and a filter mapped to /something/*:
      <filter-mapping>
       <filter-name>myFilter</filter-name>
       <url-pattern>/something/*</url-pattern>
       <dispatcher>INCLUDE</dispatcher>
       <dispatcher>FORWARD</dispatcher>
      </filter-mapping>
      


      At some point in my servlet, I forward the request:
      response.setContentType("text/html");
      request.getRequestDispatcher("/something/sth2").forward(request, response);
      


      However, the filter doesn't get invoked. The request goes straight to the servlet. Why is that?

      --
      Cheers,
      Adam