You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/09/03 14:41:43 UTC
svn commit: r1519668 [1/2] - in /tomcat/trunk/webapps/docs: ./ appdev/
architecture/ config/ images/
Author: markt
Date: Tue Sep 3 12:41:42 2013
New Revision: 1519668
URL: http://svn.apache.org/r1519668
Log:
Further patch (part 3) for https://issues.apache.org/bugzilla/show_bug.cgi?id=55383
Improve markup and design of Tomcat's HTML pages
Fix some version references for Tomcat 8
Modified:
tomcat/trunk/webapps/docs/appdev/deployment.xml
tomcat/trunk/webapps/docs/appdev/index.xml
tomcat/trunk/webapps/docs/appdev/installation.xml
tomcat/trunk/webapps/docs/appdev/introduction.xml
tomcat/trunk/webapps/docs/appdev/processes.xml
tomcat/trunk/webapps/docs/appdev/source.xml
tomcat/trunk/webapps/docs/architecture/startup.xml
tomcat/trunk/webapps/docs/config/ajp.xml
tomcat/trunk/webapps/docs/config/cluster-interceptor.xml
tomcat/trunk/webapps/docs/config/cluster-membership.xml
tomcat/trunk/webapps/docs/config/cluster-sender.xml
tomcat/trunk/webapps/docs/config/cluster.xml
tomcat/trunk/webapps/docs/config/context.xml
tomcat/trunk/webapps/docs/config/engine.xml
tomcat/trunk/webapps/docs/config/filter.xml
tomcat/trunk/webapps/docs/config/globalresources.xml
tomcat/trunk/webapps/docs/config/host.xml
tomcat/trunk/webapps/docs/config/http.xml
tomcat/trunk/webapps/docs/config/listeners.xml
tomcat/trunk/webapps/docs/config/loader.xml
tomcat/trunk/webapps/docs/config/manager.xml
tomcat/trunk/webapps/docs/config/realm.xml
tomcat/trunk/webapps/docs/config/systemprops.xml
tomcat/trunk/webapps/docs/config/valve.xml
tomcat/trunk/webapps/docs/images/docs-stylesheet.css
tomcat/trunk/webapps/docs/tomcat-docs.xsl
Modified: tomcat/trunk/webapps/docs/appdev/deployment.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/deployment.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/appdev/deployment.xml (original)
+++ tomcat/trunk/webapps/docs/appdev/deployment.xml Tue Sep 3 12:41:42 2013
@@ -156,7 +156,7 @@ deployed).</p>
in Chapter 13 of the Servlet API Specification, version 2.3. Over time, it
is expected that development tools will be provided that create and edit the
deployment descriptor for you. In the meantime, to provide a starting point,
-a <a href="web.xml.txt" target="_new">basic web.xml file</a>
+a <a href="web.xml.txt" target="_blank">basic web.xml file</a>
is provided. This file includes comments that describe the purpose of each
included element.</p>
@@ -186,13 +186,11 @@ information on the Context element.</p>
<section name="Deployment With Tomcat">
- <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>
<p>In order to be executed, a web application must be deployed on
a servlet container. This is true even during development.
Modified: tomcat/trunk/webapps/docs/appdev/index.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/index.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/appdev/index.xml (original)
+++ tomcat/trunk/webapps/docs/appdev/index.xml Tue Sep 3 12:41:42 2013
@@ -65,7 +65,7 @@ developer community. The following auth
<li><a href="processes.html"><strong>Development Processes</strong></a> -
Provides brief descriptions of typical development processes
utilizing the recommended deployment and source organizations.</li>
-<li><a href="sample/" target="_new"><strong>Example Application</strong></a> -
+<li><a href="sample/" target="_blank"><strong>Example Application</strong></a> -
This directory contains a very simple, but functionally complete,
"Hello, World" application built according to the principles
described in this manual. You can use this application to
Modified: tomcat/trunk/webapps/docs/appdev/installation.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/installation.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/appdev/installation.xml (original)
+++ tomcat/trunk/webapps/docs/appdev/installation.xml Tue Sep 3 12:41:42 2013
@@ -39,7 +39,7 @@ in the following subsections.</p>
<subsection name="JDK">
-<p>Tomcat 7.0 was designed to run on Java SE 6.
+<p>Tomcat 8.0 was designed to run on Java SE 7.
</p>
<p>Compatible JDKs for many platforms (or links to where they can be found)
@@ -53,7 +53,7 @@ are available at
<p>Binary downloads of the <strong>Tomcat</strong> server are available from
<a href="http://tomcat.apache.org/">http://tomcat.apache.org/</a>.
This manual assumes you are using the most recent release
-of Tomcat 7. Detailed instructions for downloading and installing
+of Tomcat 8. Detailed instructions for downloading and installing
Tomcat are available <a href="../setup.html">here</a>.</p>
<p>In the remainder of this manual, example shell scripts assume that you have
Modified: tomcat/trunk/webapps/docs/appdev/introduction.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/introduction.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/appdev/introduction.xml (original)
+++ tomcat/trunk/webapps/docs/appdev/introduction.xml Tue Sep 3 12:41:42 2013
@@ -47,7 +47,7 @@ are included in the following subsection
<p>The discussion in this manual is aimed at developers who will be using
a text editor along with command line tools to develop and debug their
-applications. As such, the recommendations are fairly generic -- but you
+applications. As such, the recommendations are fairly generic – but you
should easily be able to apply them in either a Windows-based or Unix-based
development environment. If you are utilizing an Integrated Development
Environment (IDE) tool, you will need to adapt the advice given here to
@@ -62,7 +62,7 @@ the details of your particular environme
information, documentation, and software that is useful in developing
web applications with Tomcat.</p>
<ul>
-<li><a href="http://jcp.org/aboutJava/communityprocess/mrel/jsr245/index2.html">http://jcp.org/aboutJava/communityprocess/mrel/jsr245/index2.html</a> -
+<li><p><a href="http://jcp.org/aboutJava/communityprocess/mrel/jsr245/index2.html">http://jcp.org/aboutJava/communityprocess/mrel/jsr245/index2.html</a> -
<i>JavaServer Pages (JSP) Specification, Version 2.3</i>. Describes
the programming environment provided by standard implementations
of the JavaServer Pages (JSP) technology. In conjunction with
@@ -71,8 +71,8 @@ web applications with Tomcat.</p>
information on scripting (Chapter 9), tag extensions (Chapter 7),
and packaging JSP pages (Appendix A) is useful. The Javadoc
API Documentation is included in the specification, and with the
- Tomcat download.<br/><br/></li>
-<li><a href="http://jcp.org/aboutJava/communityprocess/final/jsr340/index.html">http://jcp.org/aboutJava/communityprocess/final/jsr340/index.html</a> -
+ Tomcat download.</p></li>
+<li><p><a href="http://jcp.org/aboutJava/communityprocess/final/jsr340/index.html">http://jcp.org/aboutJava/communityprocess/final/jsr340/index.html</a> -
<i>Servlet API Specification, Version 3.1</i>. Describes the
programming environment that must be provided by all servlet
containers conforming to this specification. In particular, you
@@ -82,7 +82,7 @@ web applications with Tomcat.</p>
security (Chapter 13), and the syntax of the <code>web.xml</code>
Web Application Deployment Descriptor (Chapter 14). The Javadoc
API Documentation is included in the specification, and with the
- Tomcat download.<br/><br/></li>
+ Tomcat download.</p></li>
</ul>
</section>
Modified: tomcat/trunk/webapps/docs/appdev/processes.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/processes.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/appdev/processes.xml (original)
+++ tomcat/trunk/webapps/docs/appdev/processes.xml Tue Sep 3 12:41:42 2013
@@ -56,12 +56,12 @@ will need to figure out the correspondin
<em>Manager</em> web application, you need to perform the following tasks
once (no matter how many web applications you plan to develop).</p>
<ul>
-<li><em>Configure the Ant custom tasks</em>. The implementation code for the
+<li><p><em>Configure the Ant custom tasks</em>. The implementation code for the
Ant custom tasks is in a JAR file named
<code>$CATALINA_HOME/lib/catalina-ant.jar</code>, which must be
copied in to the <code>lib</code> directory of your Ant installation.
- <br/><br/></li>
-<li><em>Define one or more Tomcat users</em>. The <em>Manager</em> web
+ </p></li>
+<li><p><em>Define one or more Tomcat users</em>. The <em>Manager</em> web
application runs under a security constraint that requires a user to be
logged in, and have the security role <code>manager-script</code> assigned
to him or her. How such users are defined depends on which Realm you have
@@ -69,7 +69,7 @@ once (no matter how many web application
<a href="../realm-howto.html">Realm Configuration HOW-TO</a> for more
information. You may define any number of users (with any username
and password that you like) with the <code>manager-script</code> role.
- <br/><br/></li>
+ </p></li>
</ul>
</subsection>
@@ -87,38 +87,32 @@ previous section</a>, or you can use the
repository. This might be done by a series of commands like this, where
<code>{project}</code> is the name under which your project should be
stored in the CVS repository, and {username} is your login username:</p>
-<source>
-cd {my home directory}
-mkdir myapp <-- Assumed "project source directory"
+<source><![CDATA[cd {my home directory}
+mkdir myapp <-- Assumed "project source directory"
cd myapp
mkdir docs
mkdir src
mkdir web
mkdir web/WEB-INF
cvs import -m "Initial Project Creation" {project} \
- {username} start
-</source>
+ {username} start]]></source>
<p>Now, to verify that it was created correctly in CVS, we will perform a
checkout of the new project:</p>
-<source>
-cd ..
+<source><![CDATA[cd ..
mv myapp myapp.bu
-cvs checkout {project}
-</source>
+cvs checkout {project}]]></source>
<p>Next, you will need to create and check in an initial version of the
<code>build.xml</code> script to be used for development. For getting
started quickly and easily, base your <code>build.xml</code> on the
<a href="build.xml.txt">basic build.xml file</a>, included with this manual,
or code it from scratch.</p>
-<source>
-cd {my home directory}
+<source><![CDATA[cd {my home directory}
cd myapp
-emacs build.xml <-- if you want a real editor :-)
+emacs build.xml <-- if you want a real editor :-)
cvs add build.xml
-cvs commit
-</source>
+cvs commit]]></source>
<p>Until you perform the CVS commit, your changes are local to your own
development directory. Committing makes those changes visible to other
@@ -132,8 +126,7 @@ the sample <code>build.xml</code> script
need to define the <code>catalina.home</code> property defining where
Tomcat is installed, and the manager application username and password.
You might end up with something like this:</p>
-<source>
-# Context path to install this application on
+<source><![CDATA[# Context path to install this application on
app.path=/hello
# Tomcat 7 installation directory
@@ -141,8 +134,7 @@ catalina.home=/usr/local/apache-tomcat-7
# Manager webapp username and password
manager.username=myusername
-manager.password=mypassword
-</source>
+manager.password=mypassword]]></source>
<p>In general, you will <strong>not</strong> want to check the
<code>build.properties</code> file in to the CVS repository, because it
@@ -151,13 +143,11 @@ is unique to each developer's environmen
<p>Now, create the initial version of the web application deployment
descriptor. You can base <code>web.xml</code> on the
<a href="web.xml.txt">basic web.xml file</a>, or code it from scratch.</p>
-<source>
-cd {my home directory}
+<source><![CDATA[cd {my home directory}
cd myapp/web/WEB-INF
emacs web.xml
cvs add web.xml
-cvs commit
-</source>
+cvs commit]]></source>
Note that this is only an example web.xml file. The full definition
of the deployment descriptor file is in the
@@ -176,24 +166,20 @@ project source directory.</p>
<p>Whenever you wish to refresh your development directory to reflect the
work performed by other developers, you will ask CVS to do it for you:</p>
-<source>
-cd {my home directory}
+<source><![CDATA[cd {my home directory}
cd myapp
-cvs update -dP
-</source>
+cvs update -dP]]></source>
<p>To create a new file, go to the appropriate directory, create the file,
and register it with CVS. When you are satisfied with it's contents (after
building and testing is successful), commit the new file to the repository.
For example, to create a new JSP page:</p>
-<source>
-cd {my home directory}
-cd myapp/web <-- Ultimate destination is document root
+<source><![CDATA[cd {my home directory}
+cd myapp/web <-- Ultimate destination is document root
emacs mypage.jsp
cvs add mypage.jsp
... build and test the application ...
-cvs commit
-</source>
+cvs commit]]></source>
<p>Java source code that is defined in packages must be organized in a
directory hierarchy (under the <strong>src/</strong> subdirectory) that
@@ -216,11 +202,9 @@ are going to be modifying, this is gener
<p>When you are ready to compile the application, issue the following
commands (generally, you will want a shell window open that is set to
the project source directory, so that only the last command is needed):</p>
-<source>
-cd {my home directory}
-cd myapp <-- Normally leave a window open here
-ant
-</source>
+<source><![CDATA[cd {my home directory}
+cd myapp <-- Normally leave a window open here
+ant]]></source>
<p>The Ant tool will be execute the default "compile" target in your
<code>build.xml</code> file, which will compile any new or updated Java
@@ -228,11 +212,9 @@ code. If this is the first time you com
it will cause everything to be recompiled.</p>
<p>To force the recompilation of your entire application, do this instead:</p>
-<source>
-cd {my home directory}
+<source><![CDATA[cd {my home directory}
cd myapp
-ant all
-</source>
+ant all]]></source>
<p>This is a very good habit immediately before checking in changes, to
make sure that you have not introduced any subtle problems that Javac's
@@ -248,36 +230,38 @@ quickest way to do that is to use the cu
the sample <code>build.xml</code> script. Using these commands might follow
a pattern like this:</p>
<ul>
-<li><em>Start Tomcat if needed</em>. If Tomcat is not already running,
+<li><p><em>Start Tomcat if needed</em>. If Tomcat is not already running,
you will need to start it in the usual way.
- <br/><br/></li>
-<li><em>Compile your application</em>. Use the <code>ant compile</code>
+ </p></li>
+<li><p><em>Compile your application</em>. Use the <code>ant compile</code>
command (or just <code>ant</code>, since this is the default). Make
sure that there are no compilation errors.
- <br/><br/></li>
-<li><em>Install the application</em>. Use the <code>ant install</code>
+ </p></li>
+<li><p><em>Install the application</em>. Use the <code>ant install</code>
command. This tells Tomcat to immediately start running your app on
the context path defined in the <code>app.path</code> build property.
Tomcat does <strong>NOT</strong> have to be restarted for this to
- take effect.<br/><br/></li>
-<li><em>Test the application</em>. Using your browser or other testing
+ take effect.
+ </p></li>
+<li><p><em>Test the application</em>. Using your browser or other testing
tools, test the functionality of your application.
- <br/><br/></li>
-<li><em>Modify and rebuild as needed</em>. As you discover that changes
+ </p></li>
+<li><p><em>Modify and rebuild as needed</em>. As you discover that changes
are required, make those changes in the original <strong>source</strong>
files, not in the output build directory, and re-issue the
<code>ant compile</code> command. This ensures that your changes will
be available to be saved (via <code>cvs commit</code>) later on --
the output build directory is deleted and recreated as necessary.
- <br/><br/></li>
-<li><em>Reload the application</em>. Tomcat will recognize changes in
+ </p></li>
+<li><p><em>Reload the application</em>. Tomcat will recognize changes in
JSP pages automatically, but it will continue to use the old versions
of any servlet or JavaBean classes until the application is reloaded.
You can trigger this by executing the <code>ant reload</code> command.
- <br/><br/></li>
-<li><em>Remove the application when you re done</em>. When you are through
+ </p></li>
+<li><p><em>Remove the application when you are done</em>. When you are through
working on this application, you can remove it from live execution by
- running the <code>ant remove</code> command.</li>
+ running the <code>ant remove</code> command.
+ </p></li>
</ul>
<p>Do not forget to commit your changes to the source code repository when
@@ -293,20 +277,22 @@ you have completed your testing!</p>
of your web application that can be deployed on the production server. The
following general steps are required:</p>
<ul>
-<li>Issue the command <code>ant all</code> from the project source
+<li><p>Issue the command <code>ant all</code> from the project source
directory, to rebuild everything from scratch one last time.
- <br/><br/></li>
-<li>Use the <code>cvs tag</code> command to create an identifier for
+ </p></li>
+<li><p>Use the <code>cvs tag</code> command to create an identifier for
all of the source files utilized to create this release. This allows
you to reliably reconstruct a release (from sources) at a later
- time.</li>
-<li>Issue the command <code>ant dist</code> to create a distributable
+ time.
+ </p></li>
+<li><p>Issue the command <code>ant dist</code> to create a distributable
web application archive (WAR) file, as well as a JAR file containing
the corresponding source code.
- <br/><br/></li>
-<li>Package the contents of the <code>dist</code> directory using the
+ </p></li>
+<li><p>Package the contents of the <code>dist</code> directory using the
<strong>tar</strong> or <strong>zip</strong> utility, according to
- the standard release procedures used by your organization.</li>
+ the standard release procedures used by your organization.
+ </p></li>
</ul>
</subsection>
Modified: tomcat/trunk/webapps/docs/appdev/source.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/source.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/appdev/source.xml (original)
+++ tomcat/trunk/webapps/docs/appdev/source.xml Tue Sep 3 12:41:42 2013
@@ -35,13 +35,11 @@
<section name="Directory Structure">
- <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>
<p>A key recommendation of this manual is to separate the directory
hierarchy containing your source code (described in this section) from
@@ -49,16 +47,16 @@ the directory hierarchy containing your
(described in the preceding section). Maintaining this separation has
the following advantages:</p>
<ul>
-<li>The contents of the source directories can be more easily administered,
+<li><p>The contents of the source directories can be more easily administered,
moved, and backed up if the "executable" version of the application
is not intermixed.
- <br/><br/></li>
-<li>Source code control is easier to manage on directories that contain
+ </p></li>
+<li><p>Source code control is easier to manage on directories that contain
only source files.
- <br/><br/></li>
-<li>The files that make up an installable distribution of your
+ </p></li>
+<li><p>The files that make up an installable distribution of your
application are much easier to select when the deployment
- hierarchy is separate.</li>
+ hierarchy is separate.</p></li>
</ul>
<p>As we will see, the <code>ant</code> development tool makes the creation
@@ -181,11 +179,9 @@ created by your development process in t
easy way to tell CVS to ignore these directories is to create a file named
<code>.cvsignore</code> (note the leading period) in your top-level source
directory, with the following contents:</p>
-<source>
-build
+<source>build
dist
-build.properties
-</source>
+build.properties</source>
<p>The reason for mentioning <code>build.properties</code> here will be
explained in the <a href="processes.html">Processes</a> section.</p>
@@ -244,9 +240,7 @@ archive file so you can distribute your
the targets that are designed for use by the developer, versus those targets
used internally. To ask Ant to display the project documentation, change to
the directory containing the <code>build.xml</code> file and type:</p>
-<source>
-ant -projecthelp
-</source>
+<source>ant -projecthelp</source>
<p>To give you a head start, a <a href="build.xml.txt">basic build.xml file</a>
is provided that you can customize and install in the project source directory
Modified: tomcat/trunk/webapps/docs/architecture/startup.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/architecture/startup.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/architecture/startup.xml (original)
+++ tomcat/trunk/webapps/docs/architecture/startup.xml Tue Sep 3 12:41:42 2013
@@ -35,12 +35,12 @@
<p>
This page describes how the Tomcat server starts up. There are several
different ways to start tomcat, including:
+</p>
<ul>
<li>From the command line.</li>
<li>From a Java program as an embedded server.</li>
<li>Automatically as a Windows service.</li>
</ul>
-</p>
<subsection name="description">
<p>
Modified: tomcat/trunk/webapps/docs/config/ajp.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/ajp.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/ajp.xml (original)
+++ tomcat/trunk/webapps/docs/config/ajp.xml Tue Sep 3 12:41:42 2013
@@ -49,7 +49,7 @@
the <code>jvmRoute</code> attribute of the
<a href="engine.html">Engine</a>.</p>
- <p>The native connectors supported with this Tomcat release are:
+ <p>The native connectors supported with this Tomcat release are:</p>
<ul>
<li>JK 1.2.x with any of the supported servers. See
<a href="http://tomcat.apache.org/connectors-doc/">the JK docs</a>
@@ -59,7 +59,6 @@
<a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html">the
httpd docs</a> for details.</li>
</ul>
- </p>
<p><b>Other native connectors supporting AJP may work, but are no longer
supported.</b></p>
@@ -178,7 +177,7 @@
<code>org.apache.coyote.ajp.AjpAprProtocol</code>
- the APR/native connector.<br/>
Custom implementations may also be used.<br/>
- Take a look at our <a href="#Connector Comparison">Connector
+ Take a look at our <a href="#Connector_Comparison">Connector
Comparison</a> chart.
</p>
</attribute>
@@ -187,7 +186,7 @@
<p>If this <strong>Connector</strong> is being used in a proxy
configuration, configure this attribute to specify the server name
to be returned for calls to <code>request.getServerName()</code>.
- See <a href="#Proxy Support">Proxy Support</a> for more
+ See <a href="#Proxy_Support">Proxy Support</a> for more
information.</p>
</attribute>
@@ -195,7 +194,7 @@
<p>If this <strong>Connector</strong> is being used in a proxy
configuration, configure this attribute to specify the server port
to be returned for calls to <code>request.getServerPort()</code>.
- See <a href="#Proxy Support">Proxy Support</a> for more
+ See <a href="#Proxy_Support">Proxy Support</a> for more
information.</p>
</attribute>
@@ -667,20 +666,69 @@
<subsection name="Connector Comparison">
<p>Below is a small chart that shows how the connectors differentiate.</p>
- <source>
- Java Blocking Connector Java Nio Blocking Connector APR/native Connector
- BIO NIO APR
- Classname AjpProtocol AjpNioProtocol AjpAprProtocol
- Tomcat Version 3.x onwards 7.x onwards 5.5.x onwards
- Support Polling NO YES YES
- Polling Size N/A maxConnections maxConnections
- Read Request Headers Blocking Sim Blocking Blocking
- Read Request Body Blocking Sim Blocking Blocking
- Write Response Blocking Sim Blocking Blocking
- Wait for next Request Blocking Non Blocking Non Blocking
- Max Connections maxConnections maxConnections maxConnections
- </source>
+ <table class="defaultTable" style="text-align: center;">
+ <tr>
+ <th />
+ <th>Java Blocking Connector<br />BIO</th>
+ <th>Java Nio Blocking Connector<br />NIO</th>
+ <th>APR/native Connector<br />APR</th>
+ </tr>
+ <tr>
+ <th style="text-align: left;">Classname</th>
+ <td><code class="noHighlight">AjpProtocol</code></td>
+ <td><code class="noHighlight">AjpNioProtocol</code></td>
+ <td><code class="noHighlight">AjpAprProtocol</code></td>
+ </tr>
+ <tr>
+ <th style="text-align: left;">Tomcat Version</th>
+ <td>3.x onwards</td>
+ <td>7.x onwards</td>
+ <td>5.5.x onwards</td>
+ </tr>
+ <tr>
+ <th style="text-align: left;">Support Polling</th>
+ <td>NO</td>
+ <td>YES</td>
+ <td>YES</td>
+ </tr>
+ <tr>
+ <th style="text-align: left;">Polling Size</th>
+ <td>N/A</td>
+ <td><code class="noHighlight">maxConnections</code></td>
+ <td><code class="noHighlight">maxConnections</code></td>
+ </tr>
+ <tr>
+ <th style="text-align: left;">Read Request Headers</th>
+ <td>Blocking</td>
+ <td>Sim Blocking</td>
+ <td>Blocking</td>
+ </tr>
+ <tr>
+ <th style="text-align: left;">Read Request Body</th>
+ <td>Blocking</td>
+ <td>Sim Blocking</td>
+ <td>Blocking</td>
+ </tr>
+ <tr>
+ <th style="text-align: left;">Write Response</th>
+ <td>Blocking</td>
+ <td>Sim Blocking</td>
+ <td>Blocking</td>
+ </tr>
+ <tr>
+ <th style="text-align: left;">Wait for next Request</th>
+ <td>Blocking</td>
+ <td>Non Blocking</td>
+ <td>Non Blocking</td>
+ </tr>
+ <tr>
+ <th style="text-align: left;">Max Connections</th>
+ <td><code class="noHighlight">maxConnections</code></td>
+ <td><code class="noHighlight">maxConnections</code></td>
+ <td><code class="noHighlight">maxConnections</code></td>
+ </tr>
+ </table>
</subsection>
Modified: tomcat/trunk/webapps/docs/config/cluster-interceptor.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster-interceptor.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/cluster-interceptor.xml (original)
+++ tomcat/trunk/webapps/docs/config/cluster-interceptor.xml Tue Sep 3 12:41:42 2013
@@ -41,7 +41,6 @@
</section>
<section name="Available Interceptors">
- <p>
<ul>
<li><code>org.apache.catalina.tribes.group.interceptors.TcpFailureDetector</code></li>
<li><code>org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor</code></li>
@@ -57,7 +56,6 @@
<li><code>org.apache.catalina.tribes.group.interceptors.GzipInterceptor</code></li>
<li><code>org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor</code></li>
</ul>
- </p>
</section>
<section name="Static Membership">
@@ -67,19 +65,15 @@
underneath the <code>org.apache.catalina.tribes.group.interceptors.TcpFailureDetector</code> interceptor.
Inside the <code>StaticMembershipInterceptor</code> you can add the static members you wish to have.
The <code>TcpFailureDetector</code> will do a health check on the static members,and also monitor them for crashes
- so they will have the same level of notification mechanism as the members that are automatically discovered.
- <source>
- <Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
- <Member className="org.apache.catalina.tribes.membership.StaticMember"
- port="5678"
- securePort="-1"
- host="tomcat01.mydomain.com"
- domain="staging-cluster"
- uniqueId="{0,1,2,3,4,5,6,7,8,9}"/>
- </Interceptor>
-
- </source>
- </p>
+ so they will have the same level of notification mechanism as the members that are automatically discovered.</p>
+ <source><![CDATA[ <Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
+ <Member className="org.apache.catalina.tribes.membership.StaticMember"
+ port="5678"
+ securePort="-1"
+ host="tomcat01.mydomain.com"
+ domain="staging-cluster"
+ uniqueId="{0,1,2,3,4,5,6,7,8,9}"/>
+ </Interceptor>]]></source>
</section>
<section name="Attributes">
Modified: tomcat/trunk/webapps/docs/config/cluster-membership.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster-membership.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/cluster-membership.xml (original)
+++ tomcat/trunk/webapps/docs/config/cluster-membership.xml Tue Sep 3 12:41:42 2013
@@ -98,7 +98,7 @@
a give time. The default value is <code>3000</code> ms. This means, that if a heartbeat is not received from a
member in that timeframe, the membership component will notify the cluster of this.<br/>
On a high latency network you may wish to increase this value, to protect against false positives.<br/>
- Apache Tribes also provides a <a href="cluster-interceptor.html#tcpfailuredetector"><code>TcpFailureDetector</code></a> that will
+ Apache Tribes also provides a <a href="cluster-interceptor.html#org.apache.catalina.tribes.group.interceptors.TcpFailureDetector_Attributes"><code>TcpFailureDetector</code></a> that will
verify a timeout using a TCP connection when a heartbeat timeout has occurred. This protects against false positives.
</p>
</attribute>
Modified: tomcat/trunk/webapps/docs/config/cluster-sender.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster-sender.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/cluster-sender.xml (original)
+++ tomcat/trunk/webapps/docs/config/cluster-sender.xml Tue Sep 3 12:41:42 2013
@@ -147,7 +147,7 @@
<attribute name="soTrafficClass" required="false">
Sets the traffic class level for the socket, the value is between 0 and 255.
Default value is <code>int soTrafficClass = 0x04 | 0x08 | 0x010;</code>
- Different values are defined in <a href="http://docs.oracle.com/javase/6/docs/api/java/net/Socket.html#setTrafficClass(int)">
+ Different values are defined in <a href="http://docs.oracle.com/javase/7/docs/api/java/net/Socket.html#setTrafficClass(int)">
java.net.Socket#setTrafficClass(int)</a>.
</attribute>
<attribute name="tcpNoDelay" required="false">
Modified: tomcat/trunk/webapps/docs/config/cluster.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/cluster.xml (original)
+++ tomcat/trunk/webapps/docs/config/cluster.xml Tue Sep 3 12:41:42 2013
@@ -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><Context className="org.apache.catalina.ha.context.ReplicatedContext"/></source>
+ used for your application context.</p>
+ <source><Context className="org.apache.catalina.ha.context.ReplicatedContext"/></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"><Context></a></code> configuration.
+ This manager configuration is identical to the one you would use in a regular <code><a href="context.html#Nested_Components"><Context></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 <Channel> 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/trunk/webapps/docs/config/context.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/trunk/webapps/docs/config/context.xml Tue Sep 3 12:41:42 2013
@@ -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.
@@ -800,17 +800,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>
-<Context>
+<source><![CDATA[<Context>
...
- <Valve className="org.apache.catalina.valves.AccessLogValve"
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="localhost_access_log." suffix=".txt"
- pattern="common"/>
+ pattern="common"/>
...
-</Context>
-</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>
@@ -854,24 +852,20 @@
web application as servlet context initialization parameters by nesting
<code><Parameter></code> elements inside this element. For
example, you can create an initialization parameter like this:</p>
-<source>
-<Context>
+<source><![CDATA[<Context>
...
- <Parameter name="companyName" value="My Company, Incorporated"
- override="false"/>
+ <Parameter name="companyName" value="My Company, Incorporated"
+ override="false"/>
...
-</Context>
-</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>
-<context-param>
- <param-name>companyName</param-name>
- <param-value>My Company, Incorporated</param-value>
-</context-param>
-</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>
@@ -913,25 +907,21 @@
web application 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>
-<Context>
+<source><![CDATA[<Context>
...
- <Environment name="maxExemptions" value="10"
- type="java.lang.Integer" override="false"/>
+ <Environment name="maxExemptions" value="10"
+ type="java.lang.Integer" override="false"/>
...
-</Context>
-</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>
-<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>
@@ -986,13 +976,11 @@
It will be notified about the occurrence of the corresponding
lifecycle events. Configuration of such a listener looks like this:</p>
-<source>
-<Context>
+<source><![CDATA[<Context>
...
- <Listener className="com.mycompany.mypackage.MyListener" ... >
+ <Listener className="com.mycompany.mypackage.MyListener" ... >
...
-</Context>
-</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
@@ -1014,19 +1002,17 @@
not accepted will be rejected with an HTTP "Forbidden" error.
Example filter declarations:</p>
-<source>
-<Context>
+<source><![CDATA[<Context>
...
- <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+"/>
...
-</Context>
-</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>
@@ -1043,26 +1029,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>
-<Context>
+<source><![CDATA[<Context>
...
- <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"/>
...
-</Context>
-</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>
-<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>
@@ -1142,15 +1124,13 @@
resource.</p>
<p>For example, you can create a resource link like this:</p>
-<source>
-<Context>
+<source><![CDATA[<Context>
...
- <ResourceLink name="linkToGlobalResource"
+ <ResourceLink name="linkToGlobalResource"
global="simpleValue"
type="java.lang.Integer"
...
-</Context>
-</source>
+</Context>]]></source>
<p>The valid attributes for a <code><ResourceLink></code> element
are as follows:</p>
@@ -1182,8 +1162,8 @@
two additional attributes to allow a shared data source to be used with different credentials.
When these two additional attributes are used in combination with the <code>javax.sql.DataSource</code>
type, different contexts can share a global data source with different credentials.
- Under the hood, what happens is that a call to <a href="http://docs.oracle.com/javase/6/docs/api/javax/sql/DataSource.html#getConnection()"><code>getConnection()</code></a>
- is simply translated to a call <a href="http://docs.oracle.com/javase/6/docs/api/javax/sql/DataSource.html#getConnection(java.lang.String,%20java.lang.String)">
+ Under the hood, what happens is that a call to <a href="http://docs.oracle.com/javase/7/docs/api/javax/sql/DataSource.html#getConnection()"><code>getConnection()</code></a>
+ is simply translated to a call <a href="http://docs.oracle.com/javase/7/docs/api/javax/sql/DataSource.html#getConnection(java.lang.String,%20java.lang.String)">
<code>getConnection(username, password)</code></a> on the global data source. This is an easy way to get code to be transparent to what schemas are being used,
yet be able to control connections (or pools) in the global configuration.
</p>
@@ -1212,40 +1192,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>
-<GlobalNamingResources>
+<source><![CDATA[<GlobalNamingResources>
...
- <Resource name="sharedDataSource"
- global="sharedDataSource"
- type="javax.sql.DataSource"
- factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
- alternateUsernameAllowed="true"
- username="bar"
- password="barpass"
+ <Resource name="sharedDataSource"
+ global="sharedDataSource"
+ type="javax.sql.DataSource"
+ factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
+ alternateUsernameAllowed="true"
+ username="bar"
+ password="barpass"
...
...
-</GlobalNamingResources>
+</GlobalNamingResources>
-<Context path="/foo"...>
+<Context path="/foo"...>
...
- <ResourceLink
- name="appDataSource"
- global="sharedDataSource"
- type="javax.sql.DataSource"
- factory="org.apache.naming.factory.DataSourceLinkFactory"
- username="foo"
- password="foopass"
+ <ResourceLink
+ name="appDataSource"
+ global="sharedDataSource"
+ type="javax.sql.DataSource"
+ factory="org.apache.naming.factory.DataSourceLinkFactory"
+ username="foo"
+ password="foopass"
...
-</Context>
-<Context path="/bar"...>
+</Context>
+<Context path="/bar"...>
...
- <ResourceLink
- name="appDataSource"
- global="sharedDataSource"
- type="javax.sql.DataSource"
+ <ResourceLink
+ name="appDataSource"
+ global="sharedDataSource"
+ type="javax.sql.DataSource"
...
-</Context>
-</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("foo","foopass")</code>,
Modified: tomcat/trunk/webapps/docs/config/engine.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/engine.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/engine.xml (original)
+++ tomcat/trunk/webapps/docs/config/engine.xml Tue Sep 3 12:41:42 2013
@@ -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>
-<Engine name="Standalone" ...>
+<source><![CDATA[<Engine name="Standalone" ...>
...
- <Valve className="org.apache.catalina.valves.AccessLogValve"
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="catalina_access_log." suffix=".txt"
- pattern="common"/>
+ pattern="common"/>
...
-</Engine>
-</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>
-<Engine name="Standalone" ...>
+<source><![CDATA[<Engine name="Standalone" ...>
...
- <Listener className="com.mycompany.mypackage.MyListener" ... >
+ <Listener className="com.mycompany.mypackage.MyListener" ... >
...
-</Engine>
-</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>
-<Engine name="Standalone" ...>
+<source><![CDATA[<Engine name="Standalone" ...>
...
- <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+"/>
...
-</Engine>
-</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>
Modified: tomcat/trunk/webapps/docs/config/filter.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/filter.xml?rev=1519668&r1=1519667&r2=1519668&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/filter.xml (original)
+++ tomcat/trunk/webapps/docs/config/filter.xml Tue Sep 3 12:41:42 2013
@@ -40,13 +40,11 @@
web applications by configuring them in the application's
<code>WEB-INF/web.xml</code>. Each filter is described below.</p>
- <blockquote><em>
- <p>This description uses the variable name $CATALINA_BASE to refer the
+ <p><em>This description 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>
@@ -110,16 +108,14 @@
<a href="../images/cors-flowchart.png">flowchart</a> that
demonstrates request processing by this filter is available.</p>
<p>The minimal configuration required to use this filter is:</p>
- <source>
-<filter>
- <filter-name>CorsFilter</filter-name>
- <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
-</filter>
-<filter-mapping>
- <filter-name>CorsFilter</filter-name>
- <url-pattern>/*</url-pattern>
-</filter-mapping>
- </source>
+ <source><![CDATA[<filter>
+ <filter-name>CorsFilter</filter-name>
+ <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
+</filter>
+<filter-mapping>
+ <filter-name>CorsFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+</filter-mapping>]]></source>
</subsection>
<subsection name="Filter Class Name">
<p>The filter class name for the CORS Filter is
@@ -185,40 +181,38 @@
</attributes>
<p>Here's an example of a more advanced configuration, that overrides
defaults:</p>
- <source>
-<filter>
- <filter-name>CorsFilter</filter-name>
- <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
- <init-param>
- <param-name>cors.allowed.origins</param-name>
- <param-value>*</param-value>
- </init-param>
- <init-param>
- <param-name>cors.allowed.methods</param-name>
- <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
- </init-param>
- <init-param>
- <param-name>cors.allowed.headers</param-name>
- <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>
- </init-param>
- <init-param>
- <param-name>cors.exposed.headers</param-name>
- <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>
- </init-param>
- <init-param>
- <param-name>cors.support.credentials</param-name>
- <param-value>true</param-value>
- </init-param>
- <init-param>
- <param-name>cors.preflight.maxage</param-name>
- <param-value>10</param-value>
- </init-param>
-</filter>
-<filter-mapping>
- <filter-name>CorsFilter</filter-name>
- <url-pattern>/*</url-pattern>
-</filter-mapping>
- </source>
+ <source><![CDATA[<filter>
+ <filter-name>CorsFilter</filter-name>
+ <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
+ <init-param>
+ <param-name>cors.allowed.origins</param-name>
+ <param-value>*</param-value>
+ </init-param>
+ <init-param>
+ <param-name>cors.allowed.methods</param-name>
+ <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
+ </init-param>
+ <init-param>
+ <param-name>cors.allowed.headers</param-name>
+ <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>
+ </init-param>
+ <init-param>
+ <param-name>cors.exposed.headers</param-name>
+ <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>
+ </init-param>
+ <init-param>
+ <param-name>cors.support.credentials</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>cors.preflight.maxage</param-name>
+ <param-value>10</param-value>
+ </init-param>
+</filter>
+<filter-mapping>
+ <filter-name>CorsFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+</filter-mapping>]]></source>
</subsection>
<subsection name="CORS Filter and HttpServletRequest attributes">
<p>CORS Filter adds information about the request, in HttpServletRequest
@@ -353,31 +347,28 @@
headers to images, css and javascript.
</p>
- <source>
-<filter>
- <filter-name>ExpiresFilter</filter-name>
- <filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
- <init-param>
- <param-name>ExpiresByType image</param-name>
- <param-value>access plus 10 minutes</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType text/css</param-name>
- <param-value>access plus 10 minutes</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType application/javascript</param-name>
- <param-value>access plus 10 minutes</param-value>
- </init-param>
-</filter>
+ <source><![CDATA[<filter>
+ <filter-name>ExpiresFilter</filter-name>
+ <filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
+ <init-param>
+ <param-name>ExpiresByType image</param-name>
+ <param-value>access plus 10 minutes</param-value>
+ </init-param>
+ <init-param>
+ <param-name>ExpiresByType text/css</param-name>
+ <param-value>access plus 10 minutes</param-value>
+ </init-param>
+ <init-param>
+ <param-name>ExpiresByType application/javascript</param-name>
+ <param-value>access plus 10 minutes</param-value>
+ </init-param>
+</filter>
...
-<filter-mapping>
- <filter-name>ExpiresFilter</filter-name>
- <url-pattern>/*</url-pattern>
- <dispatcher>REQUEST</dispatcher>
-</filter-mapping>
-
- </source>
+<filter-mapping>
+ <filter-name>ExpiresFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+</filter-mapping>]]></source>
</subsection>
@@ -387,34 +378,34 @@
defined in a more readable syntax of the form:
</p>
- <source>
-<init-param>
- <param-name>ExpiresDefault</param-name>
- <param-value><base> [plus] {<num> <type>}*</param-value>
-</init-param>
-
-<init-param>
- <param-name>ExpiresByType type</param-name>
- <param-value><base> [plus] {<num> <type>}*</param-value>
-</init-param>
-
-<init-param>
- <param-name>ExpiresByType type;encoding</param-name>
- <param-value><base> [plus] {<num> <type>}*</param-value>
-</init-param>
- </source>
+ <source><![CDATA[<init-param>
+ <param-name>ExpiresDefault</param-name>
+ <param-value><base> [plus] {<num> <type>}*</param-value>
+</init-param>
+
+<init-param>
+ <param-name>ExpiresByType type</param-name>
+ <param-value><base> [plus] {<num> <type>}*</param-value>
+</init-param>
+
+<init-param>
+ <param-name>ExpiresByType type;encoding</param-name>
+ <param-value><base> [plus] {<num> <type>}*</param-value>
+</init-param>]]></source>
<p>
where <code><base></code> is one of:
+ </p>
<ul>
<li><code>access</code></li>
<li><code>now</code> (equivalent to '<code>access</code>')</li>
<li><code>modification</code></li>
</ul>
- </p>
+
<p>
The <code>plus</code> keyword is optional. <code><num></code> should be an
integer value (acceptable to <code>Integer.parseInt()</code>), and
<code><type></code> is one of:
+ </p>
<ul>
<li><code>years</code></li>
<li><code>months</code></li>
@@ -424,42 +415,39 @@
<li><code>minutes</code></li>
<li><code>seconds</code></li>
</ul>
+ <p>
For example, any of the following directives can be used to make documents
expire 1 month after being accessed, by default:
</p>
- <source>
-<init-param>
- <param-name>ExpiresDefault</param-name>
- <param-value>access plus 1 month</param-value>
-</init-param>
-
-<init-param>
- <param-name>ExpiresDefault</param-name>
- <param-value>access plus 4 weeks</param-value>
-</init-param>
-
-<init-param>
- <param-name>ExpiresDefault</param-name>
- <param-value>access plus 30 days</param-value>
-</init-param>
-</source>
+ <source><![CDATA[<init-param>
+ <param-name>ExpiresDefault</param-name>
+ <param-value>access plus 1 month</param-value>
+</init-param>
+
+<init-param>
+ <param-name>ExpiresDefault</param-name>
+ <param-value>access plus 4 weeks</param-value>
+</init-param>
+
+<init-param>
+ <param-name>ExpiresDefault</param-name>
+ <param-value>access plus 30 days</param-value>
+</init-param>]]></source>
<p>
The expiry time can be fine-tuned by adding several '
<code><num> <type></code>' clauses:
</p>
-<source>
-<init-param>
- <param-name>ExpiresByType text/html</param-name>
- <param-value>access plus 1 month 15 days 2 hours</param-value>
-</init-param>
-
-<init-param>
- <param-name>ExpiresByType image/gif</param-name>
- <param-value>modification plus 5 hours 3 minutes</param-value>
-</init-param>
- </source>
+<source><![CDATA[<init-param>
+ <param-name>ExpiresByType text/html</param-name>
+ <param-value>access plus 1 month 15 days 2 hours</param-value>
+</init-param>
+
+<init-param>
+ <param-name>ExpiresByType image/gif</param-name>
+ <param-value>modification plus 5 hours 3 minutes</param-value>
+</init-param>]]></source>
<p>
Note that if you use a modification date based setting, the <code>Expires</code>
header will <strong>not</strong> be added to content that does not come from
@@ -471,6 +459,7 @@ The expiry time can be fine-tuned by add
<subsection name="Expiration headers generation eligibility">
<p>
A response is eligible to be enriched by <code>ExpiresFilter</code> if :
+ </p>
<ol>
<li>no expiration header is defined (<code>Expires</code> header or the
<code>max-age</code> directive of the <code>Cache-Control</code> header),</li>
@@ -480,7 +469,7 @@ The expiry time can be fine-tuned by add
defined the in <code>ExpiresByType</code> directives or the
<code>ExpiresDefault</code> directive is defined.</li>
</ol>
- </p>
+
<p>
Note : If <code>Cache-Control</code> header contains other directives than
<code>max-age</code>, they are concatenated with the <code>max-age</code> directive
@@ -492,6 +481,7 @@ The expiry time can be fine-tuned by add
<subsection name="Expiration configuration selection">
<p>
The expiration configuration if elected according to the following algorithm:
+ </p>
<ol>
<li><code>ExpiresByType</code> matching the exact content-type returned by
<code>HttpServletResponse.getContentType()</code> possibly including the charset
@@ -505,7 +495,7 @@ The expiry time can be fine-tuned by add
'),</li>
<li><code>ExpiresDefault</code></li>
</ol>
- </p>
+
</subsection>
<subsection name="Filter Class Name">
@@ -600,29 +590,25 @@ The expiry time can be fine-tuned by add
</attribute>
</attributes>
- <p><i>Sample : exclude response status codes 302, 500 and 503</i></p>
+ <p><i>Sample: exclude response status codes 302, 500 and 503</i></p>
-<source>
-<init-param>
- <param-name>ExpiresExcludedResponseStatusCodes</param-name>
- <param-value>302, 500, 503</param-value>
-</init-param>
-</source>
+<source><![CDATA[<init-param>
+ <param-name>ExpiresExcludedResponseStatusCodes</param-name>
+ <param-value>302, 500, 503</param-value>
+</init-param>]]></source>
<p><i>Sample for ExpiresByType initialization parameter</i></p>
- <source>
-<init-param>
- <param-name>ExpiresByType text/html</param-name>
- <param-value>access plus 1 month 15 days 2 hours</param-value>
-</init-param>
-
-<init-param>
- <!-- 2592000 seconds = 30 days -->
- <param-name>ExpiresByType image/gif</param-name>
- <param-value>A2592000</param-value>
-</init-param>
- </source>
+ <source><![CDATA[<init-param>
+ <param-name>ExpiresByType text/html</param-name>
+ <param-value>access plus 1 month 15 days 2 hours</param-value>
+</init-param>
+
+<init-param>
+ <!-- 2592000 seconds = 30 days -->
+ <param-name>ExpiresByType image/gif</param-name>
+ <param-value>A2592000</param-value>
+</init-param>]]></source>
</subsection>
@@ -635,44 +621,36 @@ The expiry time can be fine-tuned by add
Extract of logging.properties
</p>
- <source>
-org.apache.catalina.filters.ExpiresFilter.level = FINE
- </source>
+ <source>org.apache.catalina.filters.ExpiresFilter.level = FINE </source>
<p>
Sample of initialization log message:
</p>
- <source>
-Mar 26, 2010 2:01:41 PM org.apache.catalina.filters.ExpiresFilter init
+ <source>Mar 26, 2010 2:01:41 PM org.apache.catalina.filters.ExpiresFilter init
FINE: Filter initialized with configuration ExpiresFilter[
excludedResponseStatusCode=[304],
default=null,
byType={
image=ExpiresConfiguration[startingPoint=ACCESS_TIME, duration=[10 MINUTE]],
text/css=ExpiresConfiguration[startingPoint=ACCESS_TIME, duration=[10 MINUTE]],
- text/javascript=ExpiresConfiguration[startingPoint=ACCESS_TIME, duration=[10 MINUTE]]}]
- </source>
+ text/javascript=ExpiresConfiguration[startingPoint=ACCESS_TIME, duration=[10 MINUTE]]}]</source>
<p>
Sample of per-request log message where <code>ExpiresFilter</code> adds an
expiration date is below. The message is on one line and is wrapped here
for better readability.
</p>
- <source>
-Mar 26, 2010 2:09:47 PM org.apache.catalina.filters.ExpiresFilter onBeforeWriteResponseBody
+ <source>Mar 26, 2010 2:09:47 PM org.apache.catalina.filters.ExpiresFilter onBeforeWriteResponseBody
FINE: Request "/tomcat.gif" with response status "200"
- content-type "image/gif", set expiration date 3/26/10 2:19 PM
- </source>
+ content-type "image/gif", set expiration date 3/26/10 2:19 PM</source>
<p>
Sample of per-request log message where <code>ExpiresFilter</code> does not add
an expiration date:
</p>
- <source>
-Mar 26, 2010 2:10:27 PM org.apache.catalina.filters.ExpiresFilter onBeforeWriteResponseBody
+ <source>Mar 26, 2010 2:10:27 PM org.apache.catalina.filters.ExpiresFilter onBeforeWriteResponseBody
FINE: Request "/docs/config/manager.html" with response status "200"
- content-type "text/html", no expiration configured
- </source>
+ content-type "text/html", no expiration configured</source>
</subsection>
</section>
@@ -789,20 +767,18 @@ FINE: Request "/docs/config/manager.html
<subsection name="Example">
<p>To allow access only for the clients connecting from localhost:</p>
-<source>
- <filter>
- <filter-name>Remote Address Filter</filter-name>
- <filter-class>org.apache.catalina.filters.RemoteAddrFilter</filter-class>
- <init-param>
- <param-name>allow</param-name>
- <param-value>127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>Remote Address Filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-</source>
+<source><![CDATA[ <filter>
+ <filter-name>Remote Address Filter</filter-name>
+ <filter-class>org.apache.catalina.filters.RemoteAddrFilter</filter-class>
+ <init-param>
+ <param-name>allow</param-name>
+ <param-value>127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>Remote Address Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>]]></source>
</subsection>
</section>
@@ -930,18 +906,16 @@ FINE: Request "/docs/config/manager.html
<p>
The filter will process the <code>x-forwarded-for</code> http header.
</p>
- <source>
- <filter>
- <filter-name>RemoteIpFilter</filter-name>
- <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>RemoteIpFilter</filter-name>
- <url-pattern>/*</url-pattern>
- <dispatcher>REQUEST</dispatcher>
- </filter-mapping>
- </source>
+ <source><![CDATA[ <filter>
+ <filter-name>RemoteIpFilter</filter-name>
+ <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>RemoteIpFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ </filter-mapping>]]></source>
</subsection>
<subsection name="Basic configuration to handle 'x-forwarded-for' and 'x-forwarded-proto'">
@@ -951,54 +925,50 @@ FINE: Request "/docs/config/manager.html
<code>x-forwarded-proto</code> http headers. Expected value for the
<code>x-forwarded-proto</code> header in case of SSL connections is
<code>https</code> (case insensitive). </p>
- <source>
- <filter>
- <filter-name>RemoteIpFilter</filter-name>
- <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
- <init-param>
- <param-name>protocolHeader</param-name>
- <param-value>x-forwarded-proto</param-value>
- </init-param>
- </filter>
-
- <filter-mapping>
- <filter-name>RemoteIpFilter</filter-name>
- <url-pattern>/*</url-pattern>
- <dispatcher>REQUEST</dispatcher>
- </filter-mapping>
- </source>
+ <source><![CDATA[ <filter>
+ <filter-name>RemoteIpFilter</filter-name>
+ <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
+ <init-param>
+ <param-name>protocolHeader</param-name>
+ <param-value>x-forwarded-proto</param-value>
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>RemoteIpFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ </filter-mapping>]]></source>
</subsection>
<subsection name="Advanced configuration with internal proxies">
<p>RemoteIpFilter configuration: </p>
- <source>
- <filter>
- <filter-name>RemoteIpFilter</filter-name>
- <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
- <init-param>
- <param-name>allowedInternalProxies</param-name>
- <param-value>192\.168\.0\.10|192\.168\.0\.11</param-value>
- </init-param>
- <init-param>
- <param-name>remoteIpHeader</param-name>
- <param-value>x-forwarded-for</param-value>
- </init-param>
- <init-param>
- <param-name>remoteIpProxiesHeader</param-name>
- <param-value>x-forwarded-by</param-value>
- </init-param>
- <init-param>
- <param-name>protocolHeader</param-name>
- <param-value>x-forwarded-proto</param-value>
- </init-param>
- </filter>
- </source>
- <p>Request values:
- <table border="1" cellpadding="5">
+ <source><![CDATA[ <filter>
+ <filter-name>RemoteIpFilter</filter-name>
+ <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
+ <init-param>
+ <param-name>allowedInternalProxies</param-name>
+ <param-value>192\.168\.0\.10|192\.168\.0\.11</param-value>
+ </init-param>
+ <init-param>
+ <param-name>remoteIpHeader</param-name>
+ <param-value>x-forwarded-for</param-value>
+ </init-param>
+ <init-param>
+ <param-name>remoteIpProxiesHeader</param-name>
+ <param-value>x-forwarded-by</param-value>
+ </init-param>
+ <init-param>
+ <param-name>protocolHeader</param-name>
+ <param-value>x-forwarded-proto</param-value>
+ </init-param>
+ </filter>]]></source>
+ <p>Request values:</p>
+ <table class="defaultTable">
<tr>
- <th bgcolor="#023264"><font color="#ffffff">Property</font></th>
- <th bgcolor="#023264"><font color="#ffffff">Value Before RemoteIpFilter</font></th>
- <th bgcolor="#023264"><font color="#ffffff">Value After RemoteIpFilter</font></th>
+ <th>Property</th>
+ <th>Value Before RemoteIpFilter</th>
+ <th>Value After RemoteIpFilter</th>
</tr>
<tr>
<td> request.remoteAddr </td>
@@ -1036,7 +1006,7 @@ FINE: Request "/docs/config/manager.html
<td> 443 </td>
</tr>
</table>
- </p>
+
<p>
Note : <code>x-forwarded-by</code> header is <code>null</code> because only
internal proxies has been traversed by the request.
@@ -1048,33 +1018,32 @@ FINE: Request "/docs/config/manager.html
<subsection name="Advanced configuration with trusted proxies">
<p>RemoteIpFilter configuration: </p>
- <source>
- <filter>
- <filter-name>RemoteIpFilter</filter-name>
- <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
- <init-param>
- <param-name>allowedInternalProxies</param-name>
- <param-value>192\.168\.0\.10|192\.168\.0\.11</param-value>
- </init-param>
- <init-param>
- <param-name>remoteIpHeader</param-name>
- <param-value>x-forwarded-for</param-value>
- </init-param>
- <init-param>
- <param-name>remoteIpProxiesHeader</param-name>
- <param-value>x-forwarded-by</param-value>
- </init-param>
- <init-param>
- <param-name>trustedProxies</param-name>
- <param-value>proxy1|proxy2</param-value>
- </init-param>
- </filter>
- </source>
- <p>Request values: <table border="1" cellpadding="5">
+ <source><![CDATA[ <filter>
+ <filter-name>RemoteIpFilter</filter-name>
+ <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
+ <init-param>
+ <param-name>allowedInternalProxies</param-name>
+ <param-value>192\.168\.0\.10|192\.168\.0\.11</param-value>
+ </init-param>
+ <init-param>
+ <param-name>remoteIpHeader</param-name>
+ <param-value>x-forwarded-for</param-value>
+ </init-param>
+ <init-param>
+ <param-name>remoteIpProxiesHeader</param-name>
+ <param-value>x-forwarded-by</param-value>
+ </init-param>
+ <init-param>
+ <param-name>trustedProxies</param-name>
+ <param-value>proxy1|proxy2</param-value>
+ </init-param>
+ </filter>]]></source>
+ <p>Request values:</p>
+ <table class="defaultTable">
<tr>
- <th bgcolor="#023264"><font color="#ffffff">Property</font></th>
- <th bgcolor="#023264"><font color="#ffffff">Value Before RemoteIpFilter</font></th>
- <th bgcolor="#023264"><font color="#ffffff">Value After RemoteIpFilter</font></th>
+ <th>Property</th>
+ <th>Value Before RemoteIpFilter</th>
+ <th>Value After RemoteIpFilter</th>
</tr>
<tr>
<td> request.remoteAddr </td>
@@ -1092,7 +1061,7 @@ FINE: Request "/docs/config/manager.html
<td> proxy1, proxy2 </td>
</tr>
</table>
- </p>
+
<p>
Note : <code>proxy1</code> and <code>proxy2</code> are both trusted proxies that
come in <code>x-forwarded-for</code> header, they both are migrated in
@@ -1103,33 +1072,32 @@ FINE: Request "/docs/config/manager.html
<subsection name="Advanced configuration with internal and trusted proxies">
<p>RemoteIpFilter configuration: </p>
- <source>
- <filter>
- <filter-name>RemoteIpFilter</filter-name>
- <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
- <init-param>
- <param-name>allowedInternalProxies</param-name>
- <param-value>192\.168\.0\.10|192\.168\.0\.11</param-value>
- </init-param>
- <init-param>
- <param-name>remoteIpHeader</param-name>
- <param-value>x-forwarded-for</param-value>
- </init-param>
- <init-param>
- <param-name>remoteIpProxiesHeader</param-name>
- <param-value>x-forwarded-by</param-value>
- </init-param>
- <init-param>
- <param-name>trustedProxies</param-name>
- <param-value>proxy1|proxy2</param-value>
- </init-param>
- </filter>
- </source>
- <p>Request values: <table border="1" cellpadding="5">
+ <source><![CDATA[ <filter>
+ <filter-name>RemoteIpFilter</filter-name>
+ <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
+ <init-param>
+ <param-name>allowedInternalProxies</param-name>
+ <param-value>192\.168\.0\.10|192\.168\.0\.11</param-value>
+ </init-param>
+ <init-param>
+ <param-name>remoteIpHeader</param-name>
+ <param-value>x-forwarded-for</param-value>
+ </init-param>
+ <init-param>
+ <param-name>remoteIpProxiesHeader</param-name>
+ <param-value>x-forwarded-by</param-value>
+ </init-param>
+ <init-param>
+ <param-name>trustedProxies</param-name>
+ <param-value>proxy1|proxy2</param-value>
+ </init-param>
+ </filter>]]></source>
+ <p>Request values:</p>
+ <table class="defaultTable">
<tr>
- <th bgcolor="#023264"><font color="#ffffff">Property</font></th>
- <th bgcolor="#023264"><font color="#ffffff">Value Before RemoteIpFilter</font></th>
- <th bgcolor="#023264"><font color="#ffffff">Value After RemoteIpFilter</font></th>
+ <th>Property</th>
+ <th>Value Before RemoteIpFilter</th>
+ <th>Value After RemoteIpFilter</th>
</tr>
<tr>
<td> request.remoteAddr </td>
@@ -1147,7 +1115,7 @@ FINE: Request "/docs/config/manager.html
<td> proxy1, proxy2 </td>
</tr>
</table>
- </p>
+
<p>
Note : <code>proxy1</code> and <code>proxy2</code> are both trusted proxies that
come in <code>x-forwarded-for</code> header, they both are migrated in
@@ -1161,33 +1129,32 @@ FINE: Request "/docs/config/manager.html
<subsection name="Advanced configuration with an untrusted proxy">
<p>RemoteIpFilter configuration: </p>
- <source>
- <filter>
- <filter-name>RemoteIpFilter</filter-name>
- <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
- <init-param>
- <param-name>allowedInternalProxies</param-name>
- <param-value>192\.168\.0\.10|192\.168\.0\.11</param-value>
- </init-param>
- <init-param>
- <param-name>remoteIpHeader</param-name>
- <param-value>x-forwarded-for</param-value>
- </init-param>
- <init-param>
- <param-name>remoteIpProxiesHeader</param-name>
- <param-value>x-forwarded-by</param-value>
- </init-param>
- <init-param>
- <param-name>trustedProxies</param-name>
- <param-value>proxy1|proxy2</param-value>
- </init-param>
- </filter>
- </source>
- <p>Request values: <table border="1" cellpadding="5">
+ <source><![CDATA[ <filter>
+ <filter-name>RemoteIpFilter</filter-name>
+ <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
+ <init-param>
+ <param-name>allowedInternalProxies</param-name>
+ <param-value>192\.168\.0\.10|192\.168\.0\.11</param-value>
+ </init-param>
+ <init-param>
+ <param-name>remoteIpHeader</param-name>
+ <param-value>x-forwarded-for</param-value>
+ </init-param>
+ <init-param>
+ <param-name>remoteIpProxiesHeader</param-name>
+ <param-value>x-forwarded-by</param-value>
+ </init-param>
+ <init-param>
+ <param-name>trustedProxies</param-name>
+ <param-value>proxy1|proxy2</param-value>
+ </init-param>
+ </filter>]]></source>
+ <p>Request values:</p>
+ <table class="defaultTable">
<tr>
- <th bgcolor="#023264"><font color="#ffffff">Property</font></th>
- <th bgcolor="#023264"><font color="#ffffff">Value Before RemoteIpFilter</font></th>
- <th bgcolor="#023264"><font color="#ffffff">Value After RemoteIpFilter</font></th>
+ <th>Property</th>
+ <th>Value Before RemoteIpFilter</th>
+ <th>Value After RemoteIpFilter</th>
</tr>
<tr>
<td> request.remoteAddr </td>
@@ -1205,7 +1172,7 @@ FINE: Request "/docs/config/manager.html
<td> proxy1 </td>
</tr>
</table>
- </p>
+
<p>
Note : <code>x-forwarded-by</code> holds the trusted proxy <code>proxy1</code>.
<code>x-forwarded-by</code> holds <code>140.211.11.130</code> because
@@ -1348,23 +1315,20 @@ FINE: Request "/docs/config/manager.html
Request Dumper filter for all requests for that web application. If the
entries were added to <code>CATALINA_BASE/conf/web.xml</code>, the Request
Dumper Filter would be enabled for all web applications.</p>
- <source>
-<filter>
- <filter-name>requestdumper</filter-name>
- <filter-class>
+ <source><![CDATA[<filter>
+ <filter-name>requestdumper</filter-name>
+ <filter-class>
org.apache.catalina.filters.RequestDumperFilter
- </filter-class>
-</filter>
-<filter-mapping>
- <filter-name>requestdumper</filter-name>
- <url-pattern>*</url-pattern>
-</filter-mapping>
- </source>
+ </filter-class>
+</filter>
+<filter-mapping>
+ <filter-name>requestdumper</filter-name>
+ <url-pattern>*</url-pattern>
+</filter-mapping>]]></source>
<p>The following entries in CATALINA_BASE/conf/logging.properties would
create a separate log file for the Request Dumper Filter output.</p>
- <source>
-# To this configuration below, 1request-dumper.org.apache.juli.FileHandler
+ <source># To this configuration below, 1request-dumper.org.apache.juli.FileHandler
# also needs to be added to the handlers property near the top of the file
1request-dumper.org.apache.juli.FileHandler.level = INFO
1request-dumper.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
@@ -1372,8 +1336,7 @@ FINE: Request "/docs/config/manager.html
1request-dumper.org.apache.juli.FileHandler.formatter = org.apache.juli.VerbatimFormatter
org.apache.catalina.filters.RequestDumperFilter.level = INFO
org.apache.catalina.filters.RequestDumperFilter.handlers = \
- 1request-dumper.org.apache.juli.FileHandler
- </source>
+ 1request-dumper.org.apache.juli.FileHandler</source>
</subsection>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org