Author: kkolinko Date: Sun Apr 27 21:53:40 2014 New Revision: 1590501 URL: http://svn.apache.org/r1590501 Log: Improve documentation markup. This is partial backport of r1519668 from trunk.
Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/globalresources.xml tomcat/tc7.0.x/trunk/webapps/docs/config/host.xml tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/globalresources.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/globalresources.xml?rev=1590501&r1=1590500&r2=1590501&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/config/globalresources.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/config/globalresources.xml Sun Apr 27 21:53:40 2014 @@ -45,7 +45,7 @@ the <a href="../jndi-resources-howto.html">JNDI Resources HOW-TO</a>. The resources defined in this element are <strong>not</strong> visible in the per-web-application contexts unless you explicitly link them with - <a href="context.html#Resource Links"><ResourceLink></a> elements. + <a href="context.html#Resource_Links"><ResourceLink></a> elements. </p> </section> @@ -70,25 +70,21 @@ web applications as environment entry resources by nesting <code><Environment></code> entries inside this element. For example, you can create an environment entry like this:</p> -<source> -<GlobalNamingResources ...> +<source><![CDATA[<GlobalNamingResources ...> ... - <Environment name="maxExemptions" value="10" - type="java.lang.Integer" override="false"/> + <Environment name="maxExemptions" value="10" + type="java.lang.Integer" override="false"/> ... -</GlobalNamingResources> -</source> +</GlobalNamingResources>]]></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> -<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> +<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> @@ -137,7 +133,7 @@ to be returned for JNDI lookups of <code><resource-ref></code> and <code><resource-env-ref></code> elements in the web application deployment descriptor by defining them in this element and then linking - them with <a href="context.html#Resource Links"><ResourceLink></a> + them with <a href="context.html#Resource_Links"><ResourceLink></a> elements in the <code><strong><Context></strong></code> element. @@ -147,26 +143,22 @@ the properties used to configure that object factory.</p> <p>For example, you can create a resource definition like this:</p> -<source> -<GlobalNamingResources ...> +<source><![CDATA[<GlobalNamingResources ...> ... - <Resource name="jdbc/EmployeeDB" auth="Container" + <Resource name="jdbc/EmployeeDB" auth="Container" type="javax.sql.DataSource" - description="Employees Database for HR Applications"/> + description="Employees Database for HR Applications"/> ... -</GlobalNamingResources> -</source> +</GlobalNamingResources>]]></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> -<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> +<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> @@ -239,25 +231,21 @@ </subsection> <subsection name="Resource Links"> - <p>Use <a href="context.html#Resource Links"><ResourceLink></a> + <p>Use <a href="context.html#Resource_Links"><code><ResourceLink></code></a> elements to link resources from the global context into per-web-application contexts. Here is an example of making a custom factory available to an application, based on the example definition in the - <a href="../jndi-resources-howto.html#Generic JavaBean Resources"> + <a href="../jndi-resources-howto.html#Generic_JavaBean_Resources"> JNDI Resource HOW-TO</a>: </p> - <source> - <![CDATA[ - <Context> - <ResourceLink - name="bean/MyBeanFactory" - global="bean/MyBeanFactory" - type="com.mycompany.MyBean" - /> - </Context> - ]]> - </source> + <source><![CDATA[<Context> + <ResourceLink + name="bean/MyBeanFactory" + global="bean/MyBeanFactory" + type="com.mycompany.MyBean" + /> +</Context>]]></source> </subsection> Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/host.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/host.xml?rev=1590501&r1=1590500&r2=1590501&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/config/host.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/config/host.xml Sun Apr 27 21:53:40 2014 @@ -48,7 +48,7 @@ <p>In many cases, System Administrators wish to associate more than one network name (such as <code>www.mycompany.com</code> and <code>company.com</code>) with the same virtual host and applications. - This can be accomplished using the <a href="#Host Name Aliases">Host + This can be accomplished using the <a href="#Host_Name_Aliases">Host Name Aliases</a> feature discussed below.</p> <p>One or more <strong>Host</strong> elements are nested inside an @@ -67,13 +67,11 @@ not match the name of a <strong>Host</strong> element will be routed to the default host.</p> - <blockquote><em> - <p>The description below uses the variable name $CATALINA_BASE to refer the + <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.</p> - </em></blockquote> + the directory into which you have installed Tomcat.</em></p> </section> @@ -183,7 +181,7 @@ specify the host name, Tomcat will convert it to lower case internally. One of the Hosts nested within an <a href="engine.html">Engine</a> MUST have a name that matches the <code>defaultHost</code> setting for that - Engine. See <a href="#Host Name Aliases">Host Name Aliases</a> for + Engine. See <a href="#Host_Name_Aliases">Host Name Aliases</a> for information on how to assign more than one network name to the same virtual host.</p> </attribute> @@ -342,17 +340,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> -<Host name="localhost" ...> +<source><![CDATA[<Host name="localhost" ...> ... - <Valve className="org.apache.catalina.valves.AccessLogValve" + <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access_log." suffix=".txt" - pattern="common"/> + pattern="common"/> ... -</Host> -</source> +</Host>]]></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> @@ -399,7 +395,7 @@ for context.xml and/or WAR files.</li> </ol> - <p>When <code>autoDeploy</code> is <true>true</true>, the automatic + <p>When <code>autoDeploy</code> is <code>true</code>, the automatic deployment process will monitor the deployed web applications for changes. Depending on exactly what changes, the web application will either be re-deployed or reloaded. Re-deployment involves the creation of a new web @@ -456,13 +452,11 @@ <p>This is accomplished by utilizing one or more <strong>Alias</strong> elements nested inside your <strong>Host</strong> element. For example:</p> -<source> -<Host name="www.mycompany.com" ...> +<source><![CDATA[<Host name="www.mycompany.com" ...> ... - <Alias>mycompany.com</Alias> + <Alias>mycompany.com</Alias> ... -</Host> -</source> +</Host>]]></source> <p>In order for this strategy to be effective, all of the network names involved must be registered in your DNS server to resolve to the @@ -481,13 +475,11 @@ it will be notified about the occurrence of the corresponding lifecycle events. Configuration of such a listener looks like this:</p> -<source> -<Host name="localhost" ...> +<source><![CDATA[<Host name="localhost" ...> ... - <Listener className="com.mycompany.mypackage.MyListener" ... > + <Listener className="com.mycompany.mypackage.MyListener" ... > ... -</Host> -</source> +</Host>]]></source> <p>Note that a Listener can have any number of additional properties that may be configured from this element. Attribute names are matched @@ -509,19 +501,17 @@ not accepted will be rejected with an HTTP "Forbidden" error. Example filter declarations:</p> -<source> -<Host name="localhost" ...> +<source><![CDATA[<Host name="localhost" ...> ... - <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+"/> + <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+"/> ... -</Host> -</source> +</Host>]]></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> @@ -535,13 +525,11 @@ host. This can be accomplished by nesting an element like this inside the Host element for this virtual host:</p> -<source> -<Host name="localhost" ...> +<source><![CDATA[<Host name="localhost" ...> ... - <Valve className="org.apache.catalina.authenticator.SingleSignOn"/> + <Valve className="org.apache.catalina.authenticator.SingleSignOn"/> ... -</Host> -</source> +</Host>]]></source> <p>The Single Sign On facility operates according to the following rules: </p> @@ -587,39 +575,33 @@ <strong>Listener</strong> element like this (on a Unix system that uses the <code>/etc/passwd</code> file to identify valid users):</p> -<source> -<Host name="localhost" ...> +<source><![CDATA[<Host name="localhost" ...> ... - <Listener className="org.apache.catalina.startup.UserConfig" + <Listener className="org.apache.catalina.startup.UserConfig" directoryName="public_html" - userClass="org.apache.catalina.startup.PasswdUserDatabase"/> + userClass="org.apache.catalina.startup.PasswdUserDatabase"/> ... -</Host> -</source> +</Host>]]></source> <p>On a server where <code>/etc/passwd</code> is not in use, you can request Catalina to consider all directories found in a specified base directory (such as <code>c:\Homes</code> in this example) to be considered "user home" directories for the purposes of this directive:</p> -<source> -<Host name="localhost" ...> +<source><![CDATA[<Host name="localhost" ...> ... - <Listener className="org.apache.catalina.startup.UserConfig" + <Listener className="org.apache.catalina.startup.UserConfig" directoryName="public_html" homeBase=c:\Homes" - userClass="org.apache.catalina.startup.HomesUserDatabase"/> + userClass="org.apache.catalina.startup.HomesUserDatabase"/> ... -</Host> -</source> +</Host>]]></source> <p>If a user home directory has been set up for a user named <code>craigmcc</code>, then its contents will be visible from a client browser by making a request to a URL like:</p> -<source> -http://www.mycompany.com:8080/~craigmcc -</source> +<source>http://www.mycompany.com:8080/~craigmcc</source> <p>Successful use of this feature requires recognition of the following considerations:</p> Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml?rev=1590501&r1=1590500&r2=1590501&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml Sun Apr 27 21:53:40 2014 @@ -457,47 +457,35 @@ <h3>Using file-based Authentication and Authorisation</h3> - <p>If this listener was configured in server.xml as: - <source> - <Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" - rmiRegistryPortPlatform="10001" rmiServerPortPlatform="10002" /> - </source> - with the following system properties set (e.g. in setenv.sh): - <source> - -Dcom.sun.management.jmxremote.password.file=$CATALINA_BASE/conf/jmxremote.password + <p>If this listener was configured in server.xml as:</p> + <source><![CDATA[ <Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" + rmiRegistryPortPlatform="10001" rmiServerPortPlatform="10002" />]]></source> + <p>with the following system properties set (e.g. in setenv.sh):</p> + <source> -Dcom.sun.management.jmxremote.password.file=$CATALINA_BASE/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=$CATALINA_BASE/conf/jmxremote.access - -Dcom.sun.management.jmxremote.ssl=false - </source> - $CATALINA_BASE/conf/jmxremote.password containing: - <source> - admin letmein - </source> - $CATALINA_BASE/conf/jmxremote.access containing: - <source> - admin readwrite - </source> - then opening ports 10001 (RMI Registry) and 10002 (JMX/RMI Server) in your + -Dcom.sun.management.jmxremote.ssl=false</source> + <p>$CATALINA_BASE/conf/jmxremote.password containing:</p> + <source>admin letmein</source> + <p>$CATALINA_BASE/conf/jmxremote.access containing:</p> + <source>admin readwrite</source> + <p>then opening ports 10001 (RMI Registry) and 10002 (JMX/RMI Server) in your firewall would enable jconsole to connect to a Tomcat instance running - behind a firewall using a connection string of the form: - <source> - service:jmx:rmi://<hostname>:10002/jndi/rmi://<hostname>:10001/jmxrmi - </source> + behind a firewall using a connection string of the form:</p> + <source>service:jmx:rmi://<hostname>:10002/jndi/rmi://<hostname>:10001/jmxrmi</source> + <p> with a user name of <code>admin</code> and a password of <code>letmein</code>. </p> <h3>Using JAAS</h3> - <p>If we use the following system properties instead: - <source> - -Dcom.sun.management.jmxremote.login.config=Tomcat + <p>If we use the following system properties instead:</p> + <source> -Dcom.sun.management.jmxremote.login.config=Tomcat -Djava.security.auth.login.config=$CATALINA_BASE/conf/login.config -Dcom.sun.management.jmxremote.access.file=$CATALINA_BASE/conf/jmxremote.access - -Dcom.sun.management.jmxremote.ssl=false - </source> - $CATALINA_BASE/conf/login.config containing your choice of JAAS LoginModule implementation, for example: - <source> - Tomcat { /* should match to the com.sun.management.jmxremote.login.config property */ + -Dcom.sun.management.jmxremote.ssl=false</source> + <p>$CATALINA_BASE/conf/login.config containing your choice of JAAS LoginModule implementation, for example:</p> + <source> Tomcat { /* should match to the com.sun.management.jmxremote.login.config property */ /* for illustration purposes only */ com.sun.security.auth.module.LdapLoginModule REQUIRED @@ -505,12 +493,10 @@ userFilter="(&(uid={USERNAME})(objectClass=inetOrgPerson))" authzIdentity="admin" debug=true; - }; - </source> - $CATALINA_BASE/conf/jmxremote.access containing: - <source> - admin readwrite - </source> + };</source> + <p>$CATALINA_BASE/conf/jmxremote.access containing:</p> + <source>admin readwrite</source> + <p> then we would need to provide LDAP credentials instead. </p> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org