On 16/05/2013 14:47, Xavier Dury wrote:
> I tried adding a $CATALINA_BASE/conf/[enginename]/[hostname]/web.xml.default 
> and checked what was the resulting web.xml with logEffectiveWebXml="true". I 
> noticed that the order of the various elements (filter, servlets...) appeared 
> as:
> 
>  1. conf/web.xml
>  2. WEB-INF/web.xml
>  3. $CATALINA_BASE/conf/[enginename]/[hostname]/web.xml.default
> 
> I would have expected WEB-INF/web.xml to be the last one (or the first one if 
> you want, but certainly not between the 2 others). Is it normal?

The expected processing order is:

1. Create a blank representation of web.xml
2. Parse global web.xml into 1
3. Parse host web.xml into 1. This process is additive except for
welcome files which will use replacement
4. Process main web.xml including fragments
5. Merge the defaults from 3 into 4 as if they were a fragment

Note that order in the resulting web.xml only applies to elements where
order is important (e.g. listeners). Servlets and Filters will be
displayed in whatever order they come out of the associated HashMaps.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to