web-fragment.xml
<web-fragment>
<name>MyFragment1</name>
<ordering><after><name>MyFragment2</name></after></ordering>
...
</web-fragment>
web-fragment.xml
<web-fragment>
<name>MyFragment2</name>
..
</web-fragment>
web-fragment.xml
<web-fragment>
<name>MyFragment3</name>
<ordering><before><others/></before></ordering>
..
</web-fragment>
web.xml
<web-app>
...
</web-app>
In this example the processing order will be
web.xml
MyFragment3
MyFragment2
MyFragment1
If a web-fragment.xml file does not have an <ordering> or the web.xml does
not have an <absolute-ordering> element the artifacts are assumed to not
have any ordering dependency.
Ishan Pandya
When you define an URL-pattern in both the web.xml and in a @WebServlet annotation for the same Servlet, the URL-pattern in the deployment descriptor overrides the URL-pattern of the annotation.
From Servlet 3.0
8.2.3 Assembling the descriptor from web.xml, webfragment.xml and annotations
n. iv.) url-patterns, when specified in a descriptor for a given servlet name overrides the url patterns specified via the annotation.
Frits Walraven
Alex Theedom
What exactly is your question?
NOW here in lies the rub, All AsyncContext initiated dispatches will wait till the HTTP thread initiated dispatch
has completed it's job and has returned back to the container. The AsyncContext initiated dispatches will follow
the completion of HTTP thread's dispatch.
Confusion 2:
If we are allowed to do this then why is it mentioned in Head First Servlets on pg.no 137 that once committed too late rule applies also to setting headers,cookies,status codes,content type and so on.