Filter's doFilter() method is getting invoked before servlet's init()

Solution Unverified - Updated -

Issue

In JBoss Web (EAP 6), 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) the order is as follows.

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

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.0.0
    • 7.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.