Author: markt Date: Fri Oct 10 04:12:21 2008 New Revision: 703403 URL: http://svn.apache.org/viewvc?rev=703403&view=rev Log: Update docs: clarify context.xml copying and multi-level contexts, remove reference to default context
Modified: tomcat/trunk/webapps/docs/config/context.xml tomcat/trunk/webapps/docs/config/host.xml Modified: tomcat/trunk/webapps/docs/config/context.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=703403&r1=703402&r2=703403&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/config/context.xml (original) +++ tomcat/trunk/webapps/docs/config/context.xml Fri Oct 10 04:12:21 2008 @@ -75,22 +75,30 @@ <p><strong>Context</strong> elements may be explicitly defined: <ul> - <li>in the <code>$CATALINA_BASE/conf/context.xml</code> file: - the Context element information will be loaded by all webapps</li> - <li>in the + <li>In the <code>$CATALINA_BASE/conf/context.xml</code> file: + the Context element information will be loaded by all webapps.</li> + <li>In the <code>$CATALINA_BASE/conf/[enginename]/[hostname]/context.xml.default</code> file: the Context element information will be loaded by all webapps of that - host</li> - <li>in individual files (with a ".xml" extension) in the + host.</li> + <li>In individual files (with a ".xml" extension) in the <code>$CATALINA_BASE/conf/[enginename]/[hostname]/</code> 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. - <code>context#path.xml</code>. The default web application may be defined - by using a file called <code>ROOT.xml</code>.</li> - <li>if the previous file was not found for this application, in an individual - file at <code>/META-INF/context.xml</code> inside the application files</li> - <li>inside a <a href="host.html">Host</a> element in the main - <code>conf/server.xml</code></li> + <code>foo#bar.xml</code> for a context path of <code>/foo/bar</code>. The + default web application may be defined by using a file called + <code>ROOT.xml</code>.</li> + <li>Only if a context file does not exist for the application in the + <code>$CATALINA_BASE/conf/[enginename]/[hostname]/</code>, in an individual + file at <code>/META-INF/context.xml</code> inside the application files. If + the web application is packaged as a WAR then + <code>/META-INF/context.xml</code> will be copied to + <code>$CATALINA_BASE/conf/[enginename]/[hostname]/</code> 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 <code>/META-INF/context.xml</code> is + placed in the host's appBase.</li> + <li>Inside a <a href="host.html">Host</a> element in the main + <code>conf/server.xml</code>.</li> </ul> </p> Modified: tomcat/trunk/webapps/docs/config/host.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/host.xml?rev=703403&r1=703402&r2=703403&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/config/host.xml (original) +++ tomcat/trunk/webapps/docs/config/host.xml Fri Oct 10 04:12:21 2008 @@ -290,17 +290,18 @@ be sure to delete the expanded directory when restarting Tomcat, so that the updated WAR file will be re-expanded (note that the auto deployer, if enabled, will automatically expand the updated WAR file - once the previously expanded directory is removed).</li> + once the previously expanded directory is removed). Multi-level contexts + may be defined by using #, eg use a WAR named <code>foo#bar.war</code> + for a context path of <code>/foo/bar</code>.</li> <li>Any subdirectory within the <em>application base directory</em> will receive an automatically generated <a href="context.html"> Context</a> element, even if this directory is not mentioned in the - <code>conf/server.xml</code> file. - This generated Context entry will be configured according to the - properties set in any <a href="defaultcontext.html">DefaultContext</a> - element nested in this Host element. The context path for this + <code>conf/server.xml</code> 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 ("").</li> + the context path will be an empty string (""). Multi-level contexts + may be defined by using #, eg use a directory named <code>foo#bar</code> + for a context path of <code>/foo/bar</code>.</li> </ul> <p>In addition to the automatic deployment that occurs at startup time, --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]