Author: markt Date: Fri Oct 27 18:20:20 2006 New Revision: 468608 URL: http://svn.apache.org/viewvc?view=rev&rev=468608 Log: Fix bug 40823. Better context docs.
Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml tomcat/container/tc5.5.x/webapps/docs/config/context.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=468608&r1=468607&r2=468608 ============================================================================== --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Fri Oct 27 18:20:20 2006 @@ -77,6 +77,11 @@ Set the <code>SCRIPT_FILENAME</code> environment variable required by PHP when using the CGIServlet to execute PHP. </update> + <fix> + <bug>40823</bug>: Update context doc to clarify use of ROOT.xml, + multi-level context paths and to further discourage use of server.xml + (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> Modified: tomcat/container/tc5.5.x/webapps/docs/config/context.xml URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/config/context.xml?view=diff&rev=468608&r1=468607&r2=468608 ============================================================================== --- tomcat/container/tc5.5.x/webapps/docs/config/context.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/config/context.xml Fri Oct 27 18:20: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 5, 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> + <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 5, 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]