Wednesday, February 27, 2008

UTF-8 Problem Between Apache and Tomcat via Mod_JK

If the UTF-8, GBK, Chinese or whatever character set it may be, is showing via Tomcat (i.e. accessing from port 8080) but not showing in Apache (via mod_jk) then one step might be to check that the AJP connector has the URIEncoding set too as mod_jk uses that connector rather than the one that might be set on port 8080.

For Example:

<connector port="9011" enablelookups="false" redirectport="8443" protocol="AJP/1.3" uriencoding="UTF-8"></connector>

2 comments:

  1. Hey, I found this that worked for me: When using mod_jk, in addition to making sure each of the *Connector* tags in server.xml has the URIEncoding="UTF-8" set, you have to add the following jkOptions parm to your httpd.conf

    JkOptions +ForwardURICompatUnparsed

    I got this from the following url: http://forums.alfresco.com/viewtopic.php?f=8&t=8667&p=35038&hilit=mod_jk#p35038

    ReplyDelete
  2. Cool. Thanks for sharing.

    ReplyDelete