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

WicketFilter doesn't handle filter mapping parameter from FilterConfig properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0-beta2
    • 1.3.0-beta3
    • wicket
    • None

    Description

      If the filterMappingUrlPattern Parameter is supplied as initParameter of the filterConfig and the url-pattern is not explicitly read from web.xml by Wicket (i.e. getFilterPath(HttpServletRequest) not getFilterPath(String, InputStream) is used to initialize the filter path), Wicket cuts off two chars ("/"), not one char ("") from the end of the pattern and uses that to calculate the relative Path which determines if a Request is to be served by Wicket or not. This makes requests to the application homepage not work in such cases, as getRelativePath() will yields "/", which is not recognized by Wicket as homepage request in isWicketRequest().
      Since you can't manually mount the homepage on "/" there's no workaround besides adding an additional slash to the filter pattern ("//*").

      Attachments

        1. WICKET-724.diff
          0.7 kB
          Martin Wehner

        Activity

          People

            jbq Jean-Baptiste Quenot
            mwehner Martin Wehner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: