java - Tomcat's context hierarchy -


i know tomcat can define contexts in few different ways. particular question, have main context defined in $catalina_home/conf/context.xml, , per module context's defined in each respective module's /meta-inf/context.xml. question is, if have set parameters in main context aren't been set/overrided in per module contexts, parameters still take effect when loading per module contexts.

example:

|----$catalina_home/conf/context.xml (i have logabandoned=true set here) | |----webaps        |        |---meta-inf/context.xml (no mention of logabandoned here) 

in above scenario, logabandoned=true apply webapp's context since hasn't been overwritten or included? or parameters set in meta-inf/context.xml applied without applying parameters set in main context.xml.

thanks

per apache's documentation:

default context elements may defined apply multiple web applications. configuration individual web application override configured in 1 of these defaults. nested elements, e.g. elements, defined in default context created once each context default applies. not shared between context elements.

  • in $catalina_base/conf/context.xml file: context element information loaded web applications.
  • in $catalina_base/conf/[enginename]/[hostname]/context.xml.default file: context element information loaded web applications of host.

so looks main context applied first applications, , module's context applied, overriding context elements match default context.xml.


Comments