Is TOMCAT_HOME/conf/web.xml ever actually used? If so, what for?
Created May 7, 2012
I have not rigorously tested this, so please post comments with your experiences -- however, please be sure to say which exact version of Tomcat you were using!
Tomcat 3.1: reads conf/web.xml before reading webapp/WEB-INF/web.xml, and uses its values as a default. This allows webapps to contain partial (incomplete) web.xml files, which can be useful, but confusing and ambiguous (e.g. if a standard mime-type mapping value is left out, then should we use the default, or should we assume that there is no mapping?)
Tomcat 3.2: if WEB-INF/web.xml exists, then it never reads conf/web.xml. If WEB-INF/web.xml does not exist, then it reads conf/web.xml.
Tomcat 3.3: same as 3.2
Tomcat 4.0: does read conf/web.xml, but not clear why.
See:
- Thread from jGuru: Is TOMCAT_HOME/conf/web.xml ever actually used?
- Thread from Tomcat-User list: http://w4.metronet.com/~wjm/tomcat/2000/Dec/msg00910.html