tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Tomcat Wiki] Update of "HowTo" by AlexanderShopov
Date Tue, 04 Dec 2007 11:17:07 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.

The following page has been changed by AlexanderShopov:
http://wiki.apache.org/tomcat/HowTo

The comment on the change is:
How to set the encoding used to interpret POST requests

------------------------------------------------------------------------------
  
  }}}
  
+ == How to set the encoding used to interpret POST requests? ==
+ POST requests should specify the encoding of the parameters and values they send. Since
many clients fail to set an explicit encoding, the defaults are used - ISO 8859-1. In many
cases this is not the preferred interpretation so one should employ a javax.servlet.Filter
to set request encodings. Writing such a filter is trivial. Furthermore Tomcat already comes
with such an example filter. Please take a look at:
+  4.x:: {{{webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java}}}
+  5.x:: {{{webapps/servlets-examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java
+ webapps/jsp-examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java}}}
+  6.x:: {{{webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java}}}
+ 
+ The interpretation of paramers in GET requests is determined by the URIEncoding parameter
to the Connector element in server.xml configuration file.
+ 

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


Mime
View raw message