Author: markt Date: Sat Nov 4 13:37:20 2006 New Revision: 471266 URL: http://svn.apache.org/viewvc?view=rev&rev=471266 Log: Port fix bug 40823. Better context docs.
Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/context.xml Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/context.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/context.xml?view=diff&rev=471266&r1=471265&r2=471266 ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/config/context.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/config/context.xml Sat Nov 4 13:37:20 2006 @@ -37,36 +37,37 @@ directory hierarchy).</p> <p>You may define as many <strong>Context</strong> elements as you - wish. Each such Context MUST have a unique - context path, which is defined by the <code>path</code> attribute. - In addition, you MUST define a Context with a context path equal to + wish. Each such Context MUST have a unique context path. In + addition, a Context must be present with a context path equal to a zero-length string. This Context becomes the <em>default</em> web application for this virtual host, and is used to process all requests that do not match any other Context's context path.</p> - <p>In addition to nesting <strong>Context</strong> elements inside a - <a href="host.html">Host</a> element, you can also store them:</p> + <p><b>For Tomcat 6, unlike Tomcat 4.x, it is NOT recommended to place + <Context> elements directly in the server.xml file.</b> This + is because it makes modifing the <strong>Context</strong> configuration + more invasive since the main <code>conf/server.xml</code> file cannot be + reloaded without restarting Tomcat.</p> + + <p><strong>Context</strong> elements may be explicitly defined: <ul> - <li>in the individual <code>$CATALINA_HOME/conf/context.xml</code> file: + <li>in the <code>$CATALINA_HOME/conf/context.xml</code> file: the Context element information will be loaded by all webapps</li> - <li>in the individual + <li>in the <code>$CATALINA_HOME/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 - <code>$CATALINA_HOME/conf/[enginename]/[hostname]/</code> directory</li> - <li>if the previous file was not found for this application, in individual file - at <code>/META-INF/context.xml</code> inside the application files</li> + <li>in individual files (with a ".xml" extension) in the + <code>$CATALINA_HOME/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> </ul> - <p>See - <a href="host.html#Automatic Application Deployment">Automatic - Application Deployment</a> for more information. This method allows dynamic - reconfiguration of the web application, since the main - <code>conf/server.xml</code> file cannot be reloaded without restarting - Tomcat. <b>Please note that for tomcat 6, unlike tomcat 4.x, it is NOT - recommended to place <Context> elements directly in the server.xml file.</b> - Instead, put them in the META-INF/context.xml directory of your WAR file or - the conf directory as described above. </p> <p>In addition to explicitly specified Context elements, there are --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]