Servlet 3.0 web.xml ordering syntax is supported. (For more information, see the Servlet 3.0 specification , Section 8.2.2 Ordering of web.xml and web-fragment.xml.)
XSLT validation is not supported. You must replace any xmlns/xsi
declaration with the DOCTYPE
declarations described in the next sections.
web-fragments
First, you must use the following DOCTYPE
declaration for a web-fragment:
<!DOCTYPE web-fragment PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 3.0//EN"
"http://3ds.com/dtd/web-fragment_3_0.dtd">
To take advantage of web ordering, you can name your fragment (using the same naming convention as for fragment file names), as follows:
<web-fragment>
<name>FRAMEWORK.FRAGMENT_NAME</name>
</web-fragment>
As explained in the Servlet 3.0 specification , you can also use the ordering
tag, for example, as folllows:
<ordering>
<after><name>A</name></after>
<before><name>C</name></before>
</ordering>
web-app
You can specify an absolute ordering through the root web.xml file by using the following DOCTYPE
declaration:
<!DOCTYPE web-fragment PUBLIC "-//DTD Web Application 3.0//EN"
"http://3ds.com/dtd/web-app_3_0.dtd">
You can use the absolute-ordering
tag, for example, as follows:
<absolute-ordering>
<name>A</name>
<others/>
<name>C</name>
</absolute-ordering>