Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3881

ServletWebRequest#getServletPath must handle bogus servlet path for filter on Tomcat

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.4.17
    • None
    • wicket
    • None
    • Tomcat 5,6 and 7

    Description

      Tomcat reports a bogus servletPath for a filter iff

      • welcome files are listed in web application of Tomcat's defaults
      • a welcome file exists (e.g. index.html)
      • a request comes in with an empty path

      Example:
      "/" results in servletPath "/index.html"

      See https://issues.apache.org/bugzilla/show_bug.cgi?id=50161 for a discussion.

      Due to the bogus servletPath redirects are failing. For a test you can run wicket-examples with SignApplication mapped to root:
      <filter-mapping>
      <filter-name>SignInApplication</filter-name>
      <url-pattern>/*</url-pattern>
      <dispatcher>REQUEST</dispatcher>
      <dispatcher>INCLUDE</dispatcher>
      </filter-mapping>

      The attached quickstart shows a possible workaround, see attached patch.

      Attachments

        1. tomcatservletpath.zip
          17 kB
          Sven Meier
        2. tomcatworkaround.diff
          1 kB
          Sven Meier

        Issue Links

          Activity

            People

              svenmeier Sven Meier
              svenmeier Sven Meier
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: