Which Tomcat 5 context file takes precedence?

后端 未结 3 1651
温柔的废话
温柔的废话 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:34

    My understanding is:

    • tomcat/conf/context.xml is the "default" context.xml whose contents are overlayed with the webapp context definitions. My TC 5 default context.xml has almost nothing in it, other than listing the web.xml as a watched resource, which supports this notion.
    • tomcat/Catalina//.xml is used for the webapp. Either it is place here manually, or is taken from your webapp at deployment time...so this is the real master that TC uses. If you edit this changes will be read next start.
    • tomcat/webapps/myapp/META-INF/context.xml - this is copied to tomcat/Catalina/ upon initial deployment if you alter this after initial deployment, I don't think that has any effect

提交回复
热议问题