You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Apache Wiki <wi...@apache.org> on 2013/01/30 01:14:50 UTC

[Tomcat Wiki] Update of "FAQ/CharacterEncoding" by KonstantinKolinko

Dear Wiki user,

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

The "FAQ/CharacterEncoding" page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/CharacterEncoding?action=diff&rev1=21&rev2=22

Comment:
Correct links. s/6.0/7.0/

   1. Set the `URIEncoding` attribute on the <Connector> element in server.xml to something specific (e.g. `URIEncoding="UTF-8"`).
   1. Set the `useBodyEncodingForURI` attribute on the <Connector> element in server.xml to `true`. This will cause the Connector to use the request body's encoding for GET parameters.
  
- References: [[http://tomcat.apache.org/tomcat-6.0-doc/config/http.html|Tomcat 6 HTTP Connector]], [[http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html|Tomcat 6 AJP Connector]]
+ References: [[http://tomcat.apache.org/tomcat-7.0-doc/config/http.html|Tomcat 7 HTTP Connector]], [[http://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html|Tomcat 7 AJP Connector]]
  
  
  <<BR>>
@@ -117, +117 @@

  
  In order to completely switch to using UTF-8, you need to make the following changes:
  
-  1. Set {{{URIEncoding="UTF-8"}}} on your <Connector> in `server.xml`. References: [[http://tomcat.apache.org/tomcat-6.0-doc/config/http.html|HTTP Connector]], [[http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html|AJP Connector]].
+  1. Set {{{URIEncoding="UTF-8"}}} on your <Connector> in `server.xml`. References: [[http://tomcat.apache.org/tomcat-7.0-doc/config/http.html|HTTP Connector]], [[http://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html|AJP Connector]].
   1. Use a [[#Q3|character encoding filter]] with the default encoding set to UTF-8
   1. Change all your JSPs to include charset name in their contentType.
   For example, use {{{<%@page contentType="text/html; charset=UTF-8" %>}}} for the usual JSP pages and {{{<jsp:directive.page contentType="text/html; charset=UTF-8" />}}} for the pages in XML syntax (aka JSP Documents).

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