Which Tomcat 5 context file takes precedence?

后端 未结 3 1652
温柔的废话
温柔的废话 2020-12-13 02:45

Tomcat documentation says:

The locations for Context Descriptors are;

$CATALINA_HOME/conf/[enginename]/[hostname]/context.xml
$CATALINA_HOME/webapps/[we

3条回答
  •  不思量自难忘°
    2020-12-13 03:23

    I haven't found any official documentation, but I have observed the load order to be:

    1 tomcat_home/conf/context.xml
    2 tomcat_home/webapps/myapp/META-INF/context.xml
    

    Where #2 is the last one applied (so its settings override all previous ones, where applicable).

    I have never used the webapp named context files (your option #2).

提交回复
热议问题