Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3523

welcome-file problem with servlet filter

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide

      1. Create a WAR containing a servlet, filter and web.xml file as follows:
      1a. The servlet declared with @WebServlet("/index.html")
      1b. The filter declared with @WebFilter("/")
      1c. The web.xml containing:

      <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      </welcome-file-list>

      2. Deploy the WAR to a Wildfly instance
      3. Launch the WAR's root path, eg: http://localhost:8080/path-to-war/

      Expect to see output from the servlet, but instead get "Forbidden"

      If you remove the Filter, then you get the output from the servlet.

      Show
      1. Create a WAR containing a servlet, filter and web.xml file as follows: 1a. The servlet declared with @WebServlet("/index.html") 1b. The filter declared with @WebFilter("/") 1c. The web.xml containing: <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> 2. Deploy the WAR to a Wildfly instance 3. Launch the WAR's root path, eg: http://localhost:8080/path-to-war/ Expect to see output from the servlet, but instead get "Forbidden" If you remove the Filter, then you get the output from the servlet.

      Description

      The welcome-file is ignored when a servlet filter maps to "/".

        Attachments

          Activity

            People

            Assignee:
            swd847 Stuart Douglas
            Reporter:
            ron.leisti Ron Leisti (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: