Author: yoavs Date: Tue Dec 26 06:39:44 2006 New Revision: 490303 URL: http://svn.apache.org/viewvc?view=rev&rev=490303 Log: Bugzilla 40177: enhanced documentation warnings about character encoding issues in RequestDumperValve. Deprecate the Valve itself in favor of comparable filter in examples webapp.
Modified: tomcat/container/tc5.5.x/catalina/src/conf/server.xml tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml tomcat/container/tc5.5.x/webapps/docs/config/valve.xml Modified: tomcat/container/tc5.5.x/catalina/src/conf/server.xml URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/conf/server.xml?view=diff&rev=490303&r1=490302&r2=490303 ============================================================================== --- tomcat/container/tc5.5.x/catalina/src/conf/server.xml (original) +++ tomcat/container/tc5.5.x/catalina/src/conf/server.xml Tue Dec 26 06:39:44 2006 @@ -135,6 +135,14 @@ example application (the source for this filter may be found in "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters"). + Note that this Valve uses the platform's default character encoding. + This may cause problems for developers in another encoding, e.g. + UTF-8. Use the RequestDumperFilter instead. + + Also note that enabling this Valve will write a ton of stuff to your + logs. They are likely to grow quite large. This extensive log writing + will definitely slow down your server. + Request dumping is disabled by default. Uncomment the following element to enable it. --> <!-- Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java?view=diff&rev=490303&r1=490302&r2=490303 ============================================================================== --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java Tue Dec 26 06:39:44 2006 @@ -40,14 +40,23 @@ * <p>This Valve may be attached to any Container, depending on the granularity * of the logging you wish to perform.</p> * + * <p>Note that this Valve sets the character encoding of the request to the default + * (ISO-8859-1) if it's the first thing invoking request.getParameterNames, which + * is usually the case. If you're running in an environment where this encoding + * is problematic, consider using another debugging approach such as a Filter that + * reproduces this Valve's functionality.</p> + * + * <p>For a similar mechanism that is portable to all Servlet 2.4 + * containers, check out the "RequestDumperFilter" Filter in the + * example application (the source for this filter may be found in + * $CATALINA_HOME/webapps/examples/WEB-INF/classes/filters. + * + * @deprecated Use the RequestDumperFilter in the examples webapp instead * @author Craig R. McClanahan * @version $Revision$ $Date$ */ -public class RequestDumperValve - extends ValveBase { - - +public class RequestDumperValve extends ValveBase { // ----------------------------------------------------- Instance Variables Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=490303&r1=490302&r2=490303 ============================================================================== --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Tue Dec 26 06:39:44 2006 @@ -175,6 +175,10 @@ <fix> <bug>40192</bug>: update setup.html notes regarding Windows tray icon. (yoavs) </fix> + <fix> + <bug>40177</bug>: add more warnings to documentation about RequestDumperValve + character encoding. Deprecate this Valve in favor of RequestDumperFilter. (yoavs) + </fix> </changelog> </subsection> <subsection name="Coyote"> Modified: tomcat/container/tc5.5.x/webapps/docs/config/valve.xml URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/config/valve.xml?view=diff&rev=490303&r1=490302&r2=490303 ============================================================================== --- tomcat/container/tc5.5.x/webapps/docs/config/valve.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/config/valve.xml Tue Dec 26 06:39:44 2006 @@ -303,10 +303,7 @@ <section name="Request Dumper Valve"> - - <subsection name="Introduction"> - <p>The <em>Request Dumper Valve</em> is a useful tool in debugging interactions with a client application (or browser) that is sending HTTP requests to your Tomcat-based server. When configured, it causes @@ -320,6 +317,10 @@ subsequent calls to <code>request.setCharacterEncoding()</code> within the web application will have no effect.</p> + <p>Note: this Valve is now depracated in favor of the RequestDumperFilter, + which does the same thing in a portable manner. This Filter is included in + the examples application: see + $CATALINA_HOME/webapps/examples/WEB-INF/classes/filters for the source.</p> </subsection> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]