Pax Web

Filters executed in <filter> order rather than <filter-mapping> order

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 0.7.3
  • Component/s: War Extender
  • Labels:
    None

Description

I have a webapp I've been developing in Jetty outside of OSGi. Now trying to convert it to an OSGi bundle using PAX tooling, I found that the declared filters were not running in the expected order.

In the debugger, I noticed that the order of filters in Jetty's filter chain corresponds to the order of the <filter> elements in web.xml, rather than the order of the <filter-mapping> elements, as expected.

By reorganising web.xml, I was able to continue on to debugging the next lot of NCDF errors

Activity

Hide
Alin Dreghiciu added a comment -

Indeed this is a bug. The section SRV.6.2.4 of Servlet specs 2.5 (I suppose is the same in earlier versions) specify that the filers should be invoked and placed in the chain according to the order in <filter-mapping> document, where first are <url-pattern> and then <servlet-name> mappings.

Show
Alin Dreghiciu added a comment - Indeed this is a bug. The section SRV.6.2.4 of Servlet specs 2.5 (I suppose is the same in earlier versions) specify that the filers should be invoked and placed in the chain according to the order in <filter-mapping> document, where first are <url-pattern> and then <servlet-name> mappings.
Hide
Martin Cleaver added a comment -

Is there a way to workaround this issue? Is it likely to be fixed? It's been outstanding for long enough that I assume it's not a priority for the development team.

I ask because I want to use http://blog.jetztgrad.net/2010/01/released-grails-osgi-plugin-0-1/#comment-292

Thanks,
Martin.

Show
Martin Cleaver added a comment - Is there a way to workaround this issue? Is it likely to be fixed? It's been outstanding for long enough that I assume it's not a priority for the development team. I ask because I want to use http://blog.jetztgrad.net/2010/01/released-grails-osgi-plugin-0-1/#comment-292 Thanks, Martin.
Hide
Toni Menzel added a comment -

It was fixed as part of the current trunk. (see Resolution in the upper left corner: Fixed).

Unfortunately not released yet. So best to use latest CI builds (0.8.0-SNAPSHOT).

Show
Toni Menzel added a comment - It was fixed as part of the current trunk. (see Resolution in the upper left corner: Fixed). Unfortunately not released yet. So best to use latest CI builds (0.8.0-SNAPSHOT).

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: