Author: markt
Date: Wed Mar  6 19:18:55 2013
New Revision: 1453492

URL: http://svn.apache.org/r1453492
Log:
Clarify how context paths are derived.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
    tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1453490

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1453492&r1=1453491&r2=1453492&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Mar  6 19:18:55 2013
@@ -141,6 +141,10 @@
         application, testing it against actual output of StatusTransformer
         class. (kkolinko)
       </fix>
+      <fix>
+        Clarify the documentation on how context paths may be configured for 
web
+        applications. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml?rev=1453492&r1=1453491&r2=1453492&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml Wed Mar  6 19:18:55 
2013
@@ -88,12 +88,14 @@
   </subsection>
 
   <subsection name="Naming">
-  <p>When autoDeploy or deployOnStartup is used then there is a close
-  relationship between the <em>context name</em>, <em>context path</em>,
-  <em>context version</em> and the <em>base file name</em> used for the WAR
-  and/or directory that contains the web application when the WAR or directory
-  is located in the Host&apos;s appBase. When no version is specified, the 
rules
-  are:
+  <p>When autoDeploy or deployOnStartup the context path is derived from the
+  name of the WAR file or directory file that is automatically deployed. In 
this
+  case the context path may not be defined in a META-INF/context.xml embedded 
in
+  the application. There is, therefore, a close relationship between the
+  <em>context name</em>, <em>context path</em>, <em>context version</em> and
+  the <em>base file name</em> used for the WAR and/or directory that contains
+  the web application when the WAR or directory is located in the Host&apos;s
+  appBase. When no version is specified, the rules are:
   <ul>
     <li>contextName = contextPath</li>
     <li>If the contextPath is a zero length string, the base name is ROOT</li>
@@ -101,18 +103,34 @@
         contextPath with the leading '/' removed and any remaining '/'
         characters in the path replaced with '#'.</li>
   </ul>
-  When a version is specified, <code>##version</code> is added to the 
contextName and base
-  name. To help clarify these rules, some examples are given in the following
-  table.</p>
+  When a version is specified, <code>##version</code> is added to the
+  contextName and base name. To help clarify these rules, some examples are
+  given in the following table.</p>
 
   <table class="detail-table">
-    <tr><th>Context Path</th><th>Context Version</th><th>Context 
Name</th><th>Base filename</th></tr>
+    <tr>
+      <th>Context Path</th>
+      <th>Context Version</th>
+      <th>Context Name</th>
+      <th>Base filename</th>
+    </tr>
     <tr><td>/foo</td><td><i>None</i></td><td>/foo</td><td>foo</td></tr>
-    
<tr><td>/foo/bar</td><td><i>None</i></td><td>/foo/bar</td><td>foo#bar</td></tr>
-    <tr><td><i>Empty String</i></td><td><i>None</i></td><td><i>Empty 
String</i></td><td>ROOT</td></tr>
+    <tr>
+      <td>/foo/bar</td><td><i>None</i></td><td>/foo/bar</td><td>foo#bar</td>
+    </tr>
+    <tr>
+      <td><i>Empty String</i></td>
+      <td><i>None</i></td>
+      <td><i>Empty String</i></td>
+      <td>ROOT</td>
+    </tr>
     <tr><td>/foo</td><td>42</td><td>/foo##42</td><td>foo##42</td></tr>
-    
<tr><td>/foo/bar</td><td>42</td><td>/foo/bar##42</td><td>foo#bar##42</td></tr>
-    <tr><td><i>Empty 
String</i></td><td>42</td><td>##42</td><td>ROOT##42</td></tr>
+    <tr>
+      <td>/foo/bar</td><td>42</td><td>/foo/bar##42</td><td>foo#bar##42</td>
+    </tr>
+    <tr>
+      <td><i>Empty String</i></td><td>42</td><td>##42</td><td>ROOT##42</td>
+    </tr>
   </table>
 
   <p>The version component is treated as a <code>String</code> both for



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to