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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content