Author: kkolinko
Date: Thu Dec 22 12:31:10 2011
New Revision: 1222201
URL: http://svn.apache.org/viewvc?rev=1222201&view=rev
Log:
Better document FailedRequestFilter and SetCharacterEncodingFilter filters.
Change TOC list at the left margin of config pages:
rename last section to "Other" and move Filters page there.
Modified:
tomcat/trunk/webapps/docs/config/filter.xml
tomcat/trunk/webapps/docs/config/project.xml
Modified: tomcat/trunk/webapps/docs/config/filter.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/filter.xml?rev=1222201&r1=1222200&r2=1222201&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/filter.xml (original)
+++ tomcat/trunk/webapps/docs/config/filter.xml Thu Dec 22 12:31:10 2011
@@ -1177,10 +1177,17 @@ org.apache.catalina.filters.RequestDumpe
<subsection name="Introduction">
<p>User agents don't always include character encoding information in
- requests. Depending on the how the request is processed, a default of
either
- ISO-8859-1 or the platform default encoding may be used. This is not always
- desirable. This filter provides options for setting that encoding or
forcing
- it to a particular value.</p>
+ requests. Depending on the how the request is processed, usually the
+ default encoding of ISO-8859-1 is used. This is not always
+ desirable. This filter provides options for setting that encoding or
+ forcing it to a particular value. Essentially this filter calls
+ <code>ServletRequest.setCharacterEncoding()</code> method.</p>
+
+ <p>Effectively the value set by this filter is used when parsing parameters
+ in a POST request, if parameter parsing occurs later than this filter. Thus
+ the order of filter mappings is important. Note that the encoding for GET
+ requests is not set here, but on a <b>Connector</b>. See
+ CharacterEncoding page in the FAQ for details.</p>
</subsection>
@@ -1199,7 +1206,7 @@ org.apache.catalina.filters.RequestDumpe
<attributes>
- <attribute name="encoding" required="false">
+ <attribute name="encoding" required="true">
<p>Name of the character encoding which should be set.</p>
</attribute>
@@ -1207,7 +1214,8 @@ org.apache.catalina.filters.RequestDumpe
<p>Determines if any character encoding specified by the user agent is
ignored. If this attribute is <code>true</code>, any value provided by
the user agent is ignored. If <code>false</code>, the encoding is only
- set if the user agent did not specify an encoding.</p>
+ set if the user agent did not specify an encoding. The default value
+ is <code>false</code>.</p>
</attribute>
</attributes>
@@ -1266,6 +1274,10 @@ org.apache.catalina.filters.RequestDumpe
filter is not so high, because parameter parsing does check content type
of the request before consuming the request body.</p>
+ <p>Note, that for the POST requests to be parsed correctly, a
+ <code>SetCharacterEncodingFilter</code> filter must be configured above
+ this one. See CharacterEncoding page in the FAQ for details.</p>
+
<p>The request is rejected with HTTP status code 400 (Bad Request).</p>
</subsection>
Modified: tomcat/trunk/webapps/docs/config/project.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/project.xml?rev=1222201&r1=1222200&r2=1222201&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/project.xml (original)
+++ tomcat/trunk/webapps/docs/config/project.xml Thu Dec 22 12:31:10 2011
@@ -54,7 +54,6 @@
</menu>
<menu name="Nested Components">
- <item name="Filter" href="filter.html"/>
<item name="Global Resources" href="globalresources.html"/>
<item name="JarScanner" href="jar-scanner.html"/>
<item name="Listeners" href="listeners.html"/>
@@ -78,7 +77,8 @@
<item name="ClusterListener" href="cluster-listener.html"/>
</menu>
- <menu name="Global Settings">
+ <menu name="Other">
+ <item name="Filter" href="filter.html"/>
<item name="System properties" href="systemprops.html"/>
</menu>
</body>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]