Tomcat URI encoding configuration
The default configuration of Tomcat server includes the encoding charset ISO-8859-1.
It often happens that web applications require instead frontend and backend using different character encodings, such as UTF-8.
In these cases, reading and writing strings with special characters can be problematic…
To change this default configuration just edit the server.xml configuration file (directory “conf” tomcat) setting the “URIEncoding” attribute to the Catalina service:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<Server port="8005" shutdown="SHUTDOWN"> <!--APR library loader. Documentation at /docs/apr.html --> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html --> <Listener className="org.apache.catalina.core.JasperListener" /> <!-- Prevent memory leaks due to use of particular java/javax APIs--> ... <Service name="Catalina" URIEncoding="UTF-8"> ... |
Bye