Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-11817

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

    XMLWordPrintable

Details

    • 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()

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              rhn-support-onagano Osamu Nagano
              Jan Stourac Jan Stourac
              Jan Stourac Jan Stourac
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: