Saturday, January 19, 2013

Servlet 3.0 ( web-fragment )



metadata-complete is set for web.xml, both the annotation processing and fragments processing are disabled.


reference  https://blogs.oracle.com/swchan/entry/servlet_3_0_web_fragment


absolute-ordering in web.xml The in web.xml provides a way to specify the ordering of loading web-fragment.xml and annotation processing of web fragment. For instance,
< web-app >
...
< absolute-ordering >
               < name >A< / name >
               < others />
               < name >B</ name >
< absolute-ordering >
</ web-app > In the above example, the web fragment A would be processed first and web fragment B would be processed last.

ordering in web-fragment.xml If there is no in web.xml, then one would look at in web-fragment.xml. The details are described in section 8.2.3 of Servlet 3.0 spec.

< web-fragmen t>
    < name>A</ name>
    ...
    < ordering >
        < before >
            < others />
        </ before >
    </ ordering >
</ web-fragment > 


No comments: