Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[servlet-dev] Ordering Filters/Listeners

Hi, Servlet Expats,

As you know, web.xml has order sensitive elements such as filters or
listeners. Under deployment descriptor fragments, The ordering of
these elements will be based on the order of fragments which is
defined on "absolute-ordering" element of web.xml or "ordering"
element of web-fragment.xml.

> 8.2.3 Assembling the Descriptor from web.xml, web-fragment.xml and Annotations
> 2. The ordering will be based on the order in which ...

Both of absolute and relative ordering, all fragments are  processed
after web.xml.

> 8.2.2. Ordering of web.xml and web-fragment.xml
> 1. Absolute ordering:
> b. The web.xml and WEB-INF/classes MUST be processed before any of the web-fragments ...

> 2. Relative ordering:
> b. The web.xml and WEB-INF/classes MUST be processed before any of the web-fragments ...

No way to put the top of order for order sensitive elements (filters
or listeners ) of web-fragment.xml .

why?
This restriction is designed by some historical reason?
Or  should we discuss the optional rules to relax this restriction?

Does the current servlet specification need  2 optional features?
One is  pre-defined name for web.xml module, used in name element in
abstract-ordering or ordering elements. The other is optional flag
which treats the web.xml module as a member of  the othres elements.
These features will overwrite default ordering rule of web.xml and can
put any fragments before web.xml module.

regards,
Masao Sato



Back to the top