Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1132

[GSS] Filter.doFilter() is executed before Servlet.init() in Undertow while JBoss Web is the opposite

    Details

    • Steps to Reproduce:
      Hide
      1. Deploy attached FilterServlet.war
      2. Execute curl http://localhost:8080/FilterServlet/servlet1

      Actual result:

      INFO  [stdout] (default task-1) Inside init method of Filter
      INFO  [stdout] (default task-1) Inside doFilter method of Filter
      INFO  [stdout] (default task-1) Inside init method of Servlet
      

      Expected result:

      INFO  [stdout] (default task-1) Inside init method of Filter
      INFO  [stdout] (default task-1) Inside init method of Servlet
      INFO  [stdout] (default task-1) Inside doFilter method of Filter
      
      Show
      Deploy attached FilterServlet.war Execute curl http://localhost:8080/FilterServlet/servlet1 Actual result: INFO [stdout] ( default task-1) Inside init method of Filter INFO [stdout] ( default task-1) Inside doFilter method of Filter INFO [stdout] ( default task-1) Inside init method of Servlet Expected result: INFO [stdout] ( default task-1) Inside init method of Filter INFO [stdout] ( default task-1) Inside init method of Servlet INFO [stdout] ( default task-1) Inside doFilter method of Filter

      Description

      This is a blocker of upgrading. In JBoss Web (EAP 6 actually), the code is executed in the following order at the first request.

      1. Filter.init()
      2. Servet.init()
      3. Filter.doFilter()
      4. Servlet.service()

      While on Undertow (EAP 7.0.6, WildFly 10.1.0.Final and 11.0.0.Alpha1) the order is as follows.

      1. Filter.init()
      2. Filter.doFilter()
      3. Servet.init()
      4. Servlet.service()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  swd847 Stuart Douglas
                  Reporter:
                  swd847 Stuart Douglas
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: