There are two different sides to your question.
Tomcat own web.xml
The servlet specification allows the container (Tomcat here) to define some default components (JSP, default servlet ...). As you saw, Tomcat provides the default web.xml for this (and only one, in $CATALINA_BASE/conf/web.xml). This web.xml allows Tomcat to customize among other things :
- Default servlet (which serves files directly)
- Servlet ssp for compiling and executing jsp (and jspx) files
- Differents. mime mapping
Tomcat web.xml is always parsed before it is applied to the application. That way, any application can override the values defined by tomcat.
, : Tomcat web.xml, webapps ( $CATALINA_BASE/conf) webapp own web.xml.
-fragment.xml
3.0 , web.xml WEB-INF/web.xml META-INF/web-fragment.xml, webapp (WEB-INF/classes WEB-INF/lib).
, -.
Tomcat web.xml logEffectiveWebXml (. )