You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2014/04/27 23:40:08 UTC

svn commit: r1590498 - in /tomcat/tc7.0.x/trunk/webapps/docs/config: cluster.xml context.xml engine.xml

Author: kkolinko
Date: Sun Apr 27 21:40:08 2014
New Revision: 1590498

URL: http://svn.apache.org/r1590498
Log:
Improve documentation markup.
This is partial backport of r1519668 from trunk.

Modified:
    tomcat/tc7.0.x/trunk/webapps/docs/config/cluster.xml
    tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml
    tomcat/tc7.0.x/trunk/webapps/docs/config/engine.xml

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/cluster.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/cluster.xml?rev=1590498&r1=1590497&r2=1590498&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/config/cluster.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/cluster.xml Sun Apr 27 21:40:08 2014
@@ -55,8 +55,9 @@
 </section>
 <section name="Context Attribute Replication">
   <p>To configure context attribute replication, simply do this by swapping out the context implementation
-  used for your application context.
-    <source>&lt;Context className=&quot;org.apache.catalina.ha.context.ReplicatedContext&quot;/&gt;</source>
+  used for your application context.</p>
+  <source>&lt;Context className=&quot;org.apache.catalina.ha.context.ReplicatedContext&quot;/&gt;</source>
+  <p>
     This context extends the Tomcat <code><a href="context.html">StandardContext</a></code>
     so all the options from the <a href="context.html">base implementation</a> are valid.
   </p>
@@ -64,7 +65,7 @@
 <section name="Nested Components">
   <p><b><a href="cluster-manager.html">Manager</a>:</b> <br/>
     The session manager element identifies what kind of session manager is used in this cluster implementation.
-    This manager configuration is identical to the one you would use in a regular <code><a href="context.html#Nested%20xComponents">&lt;Context&gt;</a></code> configuration.
+    This manager configuration is identical to the one you would use in a regular <code><a href="context.html#Nested_Components">&lt;Context&gt;</a></code> configuration.
     <br/>The default value is the <code>org.apache.catalina.ha.session.DeltaManager</code> that is closely coupled with
     the <code>SimpleTcpCluster</code> implementation. Other managers like the <code>org.apache.catalina.ha.session.BackupManager</code>
     are/could be loosely coupled and don't rely on the <code>SimpleTcpCluster</code> for its data replication.
@@ -113,14 +114,12 @@
     <attribute name="channelSendOptions" required="true">
       <p>The Tribes channel send options, default is <code>8</code>.<br/>
          This option is used to set the flag that all messages sent through the
-         SimpleTcpCluster uses. The flag decides how the messages are sent, and is a simple logical OR.<br/>
+         SimpleTcpCluster uses. The flag decides how the messages are sent, and is a simple logical OR.</p>
 
-      <source>
-        int options= Channel.SEND_OPTIONS_ASYNCHRONOUS |
-                     Channel.SEND_OPTIONS_SYNCHRONIZED_ACK |
-                     Channel.SEND_OPTIONS_USE_ACK;
-      </source>
-      Some of the values are:<br/>
+      <source>int options = Channel.SEND_OPTIONS_ASYNCHRONOUS |
+              Channel.SEND_OPTIONS_SYNCHRONIZED_ACK |
+              Channel.SEND_OPTIONS_USE_ACK;</source>
+      <p>Some of the values are:<br/>
       <code>Channel.SEND_OPTIONS_SYNCHRONIZED_ACK = 0x0004</code><br/>
       <code>Channel.SEND_OPTIONS_ASYNCHRONOUS = 0x0008</code><br/>
       <code>Channel.SEND_OPTIONS_USE_ACK = 0x0002</code><br/>
@@ -134,11 +133,12 @@
       <p>Sets the start and stop flags for the &lt;Channel&gt; object used by the cluster.
          The default is <code>Channel.DEFAULT</code> which starts all the channel services, such as
          sender, receiver, multicast sender and multicast receiver.
-         The following flags are available today:
-         <source>
-           Channel.DEFAULT = Channel.SND_RX_SEQ (1)| Channel.SND_TX_SEQ (2)| Channel.MBR_RX_SEQ (4)| Channel.MBR_TX_SEQ (8);
-         </source>
-         To start a channel without multicasting, you would want to use the value <code>Channel.SND_RX_SEQ | Channel.SND_TX_SEQ</code>
+         The following flags are available today:</p>
+         <source>Channel.DEFAULT = Channel.SND_RX_SEQ (1) |
+                  Channel.SND_TX_SEQ (2) |
+                  Channel.MBR_RX_SEQ (4) |
+                  Channel.MBR_TX_SEQ (8);</source>
+         <p>To start a channel without multicasting, you would want to use the value <code>Channel.SND_RX_SEQ | Channel.SND_TX_SEQ</code>
          that equals to <code>3</code>.
       </p>
     </attribute>

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=1590498&r1=1590497&r2=1590498&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml Sun Apr 27 21:40:08 2014
@@ -35,13 +35,13 @@
 
 <section name="Introduction">
 
-    <blockquote><p><em>
+    <p><em>
     The description below uses the variable name $CATALINA_BASE to refer the
     base directory against which most relative paths are resolved. If you have
     not configured Tomcat for multiple instances by setting a CATALINA_BASE
     directory, then $CATALINA_BASE will be set to the value of $CATALINA_HOME,
     the directory into which you have installed Tomcat.
-    </em></p></blockquote>
+    </em></p>
 
   <p>The <strong>Context</strong> element represents a <em>web
   application</em>, which is run within a particular virtual host.
@@ -886,17 +886,15 @@
     <a href="host.html">Host</a>, or <a href="context.html">Context</a>
     by nesting a <a href="valve.html">Valve</a> element like this:</p>
 
-<source>
-&lt;Context&gt;
+<source><![CDATA[<Context>
   ...
-  &lt;Valve className="org.apache.catalina.valves.AccessLogValve"
+  <Valve className="org.apache.catalina.valves.AccessLogValve"
          prefix="localhost_access_log." suffix=".txt"
-         pattern="common"/&gt;
+         pattern="common"/>
   ...
-&lt;/Context&gt;
-</source>
+</Context>]]></source>
 
-    <p>See <a href="valve.html#Access Log Valve">Access Log Valve</a>
+    <p>See <a href="valve.html#Access_Log_Valve">Access Log Valve</a>
     for more information on the configuration attributes that are
     supported.</p>
 
@@ -940,24 +938,20 @@
     web application as servlet context initialization parameters by nesting
     <code>&lt;Parameter&gt;</code> elements inside this element.  For
     example, you can create an initialization parameter like this:</p>
-<source>
-&lt;Context&gt;
+<source><![CDATA[<Context>
   ...
-  &lt;Parameter name="companyName" value="My Company, Incorporated"
-         override="false"/&gt;
+  <Parameter name="companyName" value="My Company, Incorporated"
+         override="false"/>
   ...
-&lt;/Context&gt;
-</source>
+</Context>]]></source>
 
     <p>This is equivalent to the inclusion of the following element in the
     web application deployment descriptor (<code>/WEB-INF/web.xml</code>):
     </p>
-<source>
-&lt;context-param&gt;
-  &lt;param-name&gt;companyName&lt;/param-name&gt;
-  &lt;param-value&gt;My Company, Incorporated&lt;/param-value&gt;
-&lt;/context-param&gt;
-</source>
+<source><![CDATA[<context-param>
+  <param-name>companyName</param-name>
+  <param-value>My Company, Incorporated</param-value>
+</context-param>]]></source>
     <p>but does <em>not</em> require modification of the deployment descriptor
     to customize this value.</p>
 
@@ -999,25 +993,21 @@
     web application as environment entry resources, by nesting
     <code>&lt;Environment&gt;</code> entries inside this element.  For
     example, you can create an environment entry like this:</p>
-<source>
-&lt;Context&gt;
+<source><![CDATA[<Context>
   ...
-  &lt;Environment name="maxExemptions" value="10"
-         type="java.lang.Integer" override="false"/&gt;
+  <Environment name="maxExemptions" value="10"
+         type="java.lang.Integer" override="false"/>
   ...
-&lt;/Context&gt;
-</source>
+</Context>]]></source>
 
     <p>This is equivalent to the inclusion of the following element in the
     web application deployment descriptor (<code>/WEB-INF/web.xml</code>):
     </p>
-<source>
-&lt;env-entry&gt;
-  &lt;env-entry-name&gt;maxExemptions&lt;/env-entry-name&gt;
-  &lt;env-entry-value&gt;10&lt;/env-entry-value&gt;
-  &lt;env-entry-type&gt;java.lang.Integer&lt;/env-entry-type&gt;
-&lt;/env-entry&gt;
-</source>
+<source><![CDATA[<env-entry>
+  <env-entry-name>maxExemptions</env-entry-name>
+  <env-entry-value>10</env-entry-value>
+  <env-entry-type>java.lang.Integer</env-entry-type>
+</env-entry>]]></source>
     <p>but does <em>not</em> require modification of the deployment descriptor
     to customize this value.</p>
 
@@ -1072,13 +1062,11 @@
     It will be notified about the occurrence of the corresponding
     lifecycle events.  Configuration of such a listener looks like this:</p>
 
-<source>
-&lt;Context&gt;
+<source><![CDATA[<Context>
   ...
-  &lt;Listener className="com.mycompany.mypackage.MyListener" ... &gt;
+  <Listener className="com.mycompany.mypackage.MyListener" ... >
   ...
-&lt;/Context&gt;
-</source>
+</Context>]]></source>
 
     <p>Note that a Listener can have any number of additional properties
     that may be configured from this element.  Attribute names are matched
@@ -1100,19 +1088,17 @@
     not accepted will be rejected with an HTTP "Forbidden" error.
     Example filter declarations:</p>
 
-<source>
-&lt;Context&gt;
+<source><![CDATA[<Context>
   ...
-  &lt;Valve className="org.apache.catalina.valves.RemoteHostValve"
-         allow=".*\.mycompany\.com|www\.yourcompany\.com"/&gt;
-  &lt;Valve className="org.apache.catalina.valves.RemoteAddrValve"
-         deny="192\.168\.1\.\d+"/&gt;
+  <Valve className="org.apache.catalina.valves.RemoteHostValve"
+         allow=".*\.mycompany\.com|www\.yourcompany\.com"/>
+  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
+         deny="192\.168\.1\.\d+"/>
   ...
-&lt;/Context&gt;
-</source>
+</Context>]]></source>
 
-    <p>See <a href="valve.html#Remote Address Filter">Remote Address Filter</a>
-    and <a href="valve.html#Remote Host Filter">Remote Host Filter</a> for
+    <p>See <a href="valve.html#Remote_Address_Filter">Remote Address Filter</a>
+    and <a href="valve.html#Remote_Host_Filter">Remote Host Filter</a> for
     more information about the configuration options that are supported.</p>
 
   </subsection>
@@ -1129,26 +1115,22 @@
     already), and the properties used to configure that object factory.</p>
 
     <p>For example, you can create a resource definition like this:</p>
-<source>
-&lt;Context&gt;
+<source><![CDATA[<Context>
   ...
-  &lt;Resource name="jdbc/EmployeeDB" auth="Container"
+  <Resource name="jdbc/EmployeeDB" auth="Container"
             type="javax.sql.DataSource"
-     description="Employees Database for HR Applications"/&gt;
+     description="Employees Database for HR Applications"/>
   ...
-&lt;/Context&gt;
-</source>
+</Context>]]></source>
 
     <p>This is equivalent to the inclusion of the following element in the
     web application deployment descriptor (<code>/WEB-INF/web.xml</code>):</p>
-<source>
-&lt;resource-ref&gt;
-  &lt;description&gt;Employees Database for HR Applications&lt;/description&gt;
-  &lt;res-ref-name&gt;jdbc/EmployeeDB&lt;/res-ref-name&gt;
-  &lt;res-ref-type&gt;javax.sql.DataSource&lt;/res-ref-type&gt;
-  &lt;res-auth&gt;Container&lt;/res-auth&gt;
-&lt;/resource-ref&gt;
-</source>
+<source><![CDATA[<resource-ref>
+  <description>Employees Database for HR Applications</description>
+  <res-ref-name>jdbc/EmployeeDB</res-ref-name>
+  <res-ref-type>javax.sql.DataSource</res-ref-type>
+  <res-auth>Container</res-auth>
+</resource-ref>]]></source>
 
     <p>but does <em>not</em> require modification of the deployment
     descriptor to customize this value.</p>
@@ -1228,15 +1210,13 @@
      resource.</p>
 
     <p>For example, you can create a resource link like this:</p>
-<source>
-&lt;Context&gt;
+<source><![CDATA[<Context>
   ...
-  &lt;ResourceLink name="linkToGlobalResource"
+  <ResourceLink name="linkToGlobalResource"
             global="simpleValue"
             type="java.lang.Integer"
   ...
-&lt;/Context&gt;
-</source>
+</Context>]]></source>
 
     <p>The valid attributes for a <code>&lt;ResourceLink&gt;</code> element
     are as follows:</p>
@@ -1298,40 +1278,38 @@ Tomcat uses by default does not support 
 but by default this support is disabled and can be enabled by
 <code>alternateUsernameAllowed</code> attribute. See its documentation
 for details.</p>
-<source>
-&lt;GlobalNamingResources&gt;
+<source><![CDATA[<GlobalNamingResources>
   ...
-  &lt;Resource name=&quot;sharedDataSource&quot;
-            global=&quot;sharedDataSource&quot;
-            type=&quot;javax.sql.DataSource&quot;
-            factory=&quot;org.apache.tomcat.jdbc.pool.DataSourceFactory&quot;
-            alternateUsernameAllowed=&quot;true&quot;
-            username=&quot;bar&quot;
-            password=&quot;barpass&quot;
+  <Resource name="sharedDataSource"
+            global="sharedDataSource"
+            type="javax.sql.DataSource"
+            factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
+            alternateUsernameAllowed="true"
+            username="bar"
+            password="barpass"
             ...
   ...
-&lt;/GlobalNamingResources&gt;
+</GlobalNamingResources>
 
-&lt;Context path=&quot;/foo&quot;...&gt;
+<Context path="/foo"...>
   ...
-  &lt;ResourceLink
-            name=&quot;appDataSource&quot;
-            global=&quot;sharedDataSource&quot;
-            type=&quot;javax.sql.DataSource&quot;
-            factory=&quot;org.apache.naming.factory.DataSourceLinkFactory&quot;
-            username=&quot;foo&quot;
-            password=&quot;foopass&quot;
+  <ResourceLink
+            name="appDataSource"
+            global="sharedDataSource"
+            type="javax.sql.DataSource"
+            factory="org.apache.naming.factory.DataSourceLinkFactory"
+            username="foo"
+            password="foopass"
   ...
-&lt;/Context&gt;
-&lt;Context path=&quot;/bar&quot;...&gt;
+</Context>
+<Context path="/bar"...>
   ...
-  &lt;ResourceLink
-            name=&quot;appDataSource&quot;
-            global=&quot;sharedDataSource&quot;
-            type=&quot;javax.sql.DataSource&quot;
+  <ResourceLink
+            name="appDataSource"
+            global="sharedDataSource"
+            type="javax.sql.DataSource"
   ...
-&lt;/Context&gt;
-</source>
+</Context>]]></source>
     <p>When a request for <code>getConnection()</code> is made in the
        <code>/foo</code> context, the request is translated into
        <code>getConnection(&quot;foo&quot;,&quot;foopass&quot;)</code>,

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/engine.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/engine.xml?rev=1590498&r1=1590497&r2=1590498&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/config/engine.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/engine.xml Sun Apr 27 21:40:08 2014
@@ -186,17 +186,15 @@
     <a href="host.html">Host</a>, or <a href="context.html">Context</a>
     by nesting a <a href="valve.html">Valve</a> element like this:</p>
 
-<source>
-&lt;Engine name="Standalone" ...&gt;
+<source><![CDATA[<Engine name="Standalone" ...>
   ...
-  &lt;Valve className="org.apache.catalina.valves.AccessLogValve"
+  <Valve className="org.apache.catalina.valves.AccessLogValve"
          prefix="catalina_access_log." suffix=".txt"
-         pattern="common"/&gt;
+         pattern="common"/>
   ...
-&lt;/Engine&gt;
-</source>
+</Engine>]]></source>
 
-    <p>See <a href="valve.html#Access Log Valve">Access Log Valve</a>
+    <p>See <a href="valve.html#Access_Log_Valve">Access Log Valve</a>
     for more information on the configuration attributes that are
     supported.</p>
 
@@ -213,13 +211,11 @@
     it will be notified about the occurrence of the corresponding
     lifecycle events.  Configuration of such a listener looks like this:</p>
 
-<source>
-&lt;Engine name="Standalone" ...&gt;
+<source><![CDATA[<Engine name="Standalone" ...>
   ...
-  &lt;Listener className="com.mycompany.mypackage.MyListener" ... &gt;
+  <Listener className="com.mycompany.mypackage.MyListener" ... >
   ...
-&lt;/Engine&gt;
-</source>
+</Engine>]]></source>
 
     <p>Note that a Listener can have any number of additional properties
     that may be configured from this element.  Attribute names are matched
@@ -241,19 +237,17 @@
     not accepted will be rejected with an HTTP "Forbidden" error.
     Example filter declarations:</p>
 
-<source>
-&lt;Engine name="Standalone" ...&gt;
+<source><![CDATA[<Engine name="Standalone" ...>
   ...
-  &lt;Valve className="org.apache.catalina.valves.RemoteHostValve"
-         allow=".*\.mycompany\.com|www\.yourcompany\.com"/&gt;
-  &lt;Valve className="org.apache.catalina.valves.RemoteAddrValve"
-         deny="192\.168\.1\.\d+"/&gt;
+  <Valve className="org.apache.catalina.valves.RemoteHostValve"
+         allow=".*\.mycompany\.com|www\.yourcompany\.com"/>
+  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
+         deny="192\.168\.1\.\d+"/>
   ...
-&lt;/Engine&gt;
-</source>
+</Engine>]]></source>
 
-  <p>See <a href="valve.html#Remote Address Filter">Remote Address Filter</a>
-  and <a href="valve.html#Remote Host Filter">Remote Host Filter</a> for
+  <p>See <a href="valve.html#Remote_Address_Filter">Remote Address Filter</a>
+  and <a href="valve.html#Remote_Host_Filter">Remote Host Filter</a> for
   more information about the configuration options that are supported.</p>
 
   </subsection>



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