1 Reply Latest reply on Aug 14, 2002 4:57 AM by Greg Wilkins

    jetty & filters

    Bogdan Ghidireac Newbie

      Hi,

      I have a filter for *.jsp that is working ok with jboss3+tomcat4.

      When I switched to jetty, I've noticed a problem. The filter is not executed for index files (http://localhost:8080/).
      I have index.jsp in the welcome list in web.xml

      Is this a bug in jetty or am I doing something wrong ?

      Regards,
      Bogdan

        • 1. Re: jetty & filters
          Greg Wilkins Newbie

          It is actually a huge hole in the servlet specification,
          that is at least being partially closed in the next version of the spec.

          Filters are currently only applied to the request as it
          enteres the container, not on RD forwards or includes.

          Unfortunately the spec does not specify how the welcome file mechanism is implemented. Jetty uses internal request dispatchers for welcome files, so your filter does not apply. In the 2.4 spec you will be able to apply filters to RDs.

          I'm not sure why tomcat is running your filter, I almost think it is against the spec. The request URI does not match your filter spec and their is no standard mechanism that filters apply to that tomcat can use for the welcome page redirection.