Is TOMCAT_HOME/conf/web.xml ever actually used? If so, what for?

Alex Chaffee

The behavior of Tomcat wrt TOMCAT_HOME/conf/web.xml varies from version to version.

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.