From: markt Context elements may be explicitly defined:
-
$CATALINA_BASE/conf/context.xml file:
- the Context element information will be loaded by all webapps$CATALINA_BASE/conf/context.xml file:
+ the Context element information will be loaded by all webapps.$CATALINA_BASE/conf/[enginename]/[hostname]/context.xml.default
file: the Context element information will be loaded by all webapps of that
- host$CATALINA_BASE/conf/[enginename]/[hostname]/ directory.
The name of the file (less the .xml extension) will be used as the
context path. Multi-level context paths may be defined using #, e.g.
- context#path.xml. The default web application may be defined
- by using a file called ROOT.xml./META-INF/context.xml inside the application filesconf/server.xmlfoo#bar.xml for a context path of /foo/bar. The
+ default web application may be defined by using a file called
+ ROOT.xml.
+ $CATALINA_BASE/conf/[enginename]/[hostname]/, in an individual
+ file at /META-INF/context.xml inside the application files. If
+ the web application is packaged as a WAR then
+ /META-INF/context.xml will be copied to
+ $CATALINA_BASE/conf/[enginename]/[hostname]/ and renamed to
+ match the application's context path. Once this file exists, it will not be
+ replaced if a new WAR with a newer /META-INF/context.xml is
+ placed in the host's appBase.conf/server.xml.
foo#bar.war
+ for a context path of /foo/bar.
conf/server.xml file.
- This generated Context entry will be configured according to the
- properties set in any DefaultContext
- element nested in this Host element. The context path for this
+ conf/server.xml file. The context path for this
deployed Context will be a slash character ("/") followed by the
directory name, unless the directory name is ROOT, in which case
- the context path will be an empty string ("").foo#bar
+ for a context path of /foo/bar.
In addition to the automatic deployment that occurs at startup time,