LKBEN11184: Tomcat 6: Accented characters are lost accessing tomcat web server
LKB | Created: 02/04/2020 | Version: 0 | Language: EN | Rating: 0 | Outdated: False | Marked for deletion: False
Author: Wim Peeters - Keskon GmbH & Co. KG
Symptom
Accented characters are lost accessing tomcat web server
Cause
Tomcat has disabled standard servlet behavior by default. and the server response will not include the encoding bit
Solution
Tomcat 6 has disabled the standard servlet behavior by default.
To make it work you should add
-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=true
to your startup script. If you don't, the server response will not include the
encoding bit, even if the browser has provided an Accept-Language
header. The symptoms are that accessing tomcat web server will lose any accented characters
(áéí... you know what I mean). Adding this flag should get it fixed.
(http://groups.google.com/group/loom-dev/browse_thread/thread/765327bf10c76aed)
---------------------------------
Tomcat has disabled standard servlet behavior by default. To make encoding work you should add
-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=true
to your startup script. If you don't, the server response will not include the encoding bit, even if the browser has provided an Accept-Language header.
(http://loom.extrema-sistemas.org/doc/1.x/ref/charset)
CONCLUSION:
Poner en las primeras líneas del Catalina.bat:
Put in the first lines of Catalina.bat /catalina.sh:
SET CATALINA_OPTS=-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=true
or the other way, in java properties:
-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=true
About the Author
Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux in different European countries and different European languages. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform where he is one of the most important contributors and the main developer.