UTF-8 on Tomcat

I use Apache httpd + mod_jk with tomcat and connect to port 8009. Be sure to tell the tomcat connection that you are using UTF-8.

# vi /usr/local/tomcat/conf/server.xml
<Connector
  port="8009"
  URIEncoding="UTF-8"
  enableLookups="false"
  redirectPort="8443"
  protocol="AJP/1.3" />

Add two parameters to the list of JAVA_OPTS (at least for tomcat)

-Djavax.servlet.request.encoding=UTF-8
-Dfile.encoding=UTF-8"

Your email will never published nor shared. Required fields are marked *...

*

*

Type your comment out: