Prabhu Mannu wrote:
Hi all,
Found the issue it's the jsp page itself that was encoded in iso-8859-1
format.
Sighs ...... I became such a noob.
Sorry all for the trouble.
With regards
Prabhu
No problem.
That is one reason why this Tomcat Users list is great and unique on the www : just the
fact of writing to it, describing your issue clearly and concisely, automatically gives
you the solution, without anyone even having to lift a finger.
-----Original Message-----
From: Prabhu Mannu [mailto:pra...@fernridge.com]
Sent: Friday, 23 January, 2015 3:21 PM
To: users@tomcat.apache.org
Subject: Tomcat 8 encoding issues: unable to change the default encoding
iso-8859-1 to utf-8 in http header
Hi all,
Firs off Sorry if this question appears too noob.
Currently in my application I get this warning.
HTML1114: Codepage iso-8859-1 from (HTTP header) overrides conflicting
codepage utf-8 from (META tag)
File: index.action
Application uses struts 2, spring, hibernate, jpa + tiles 3 framework.
The application does have this meta tag in all the jsp files <meta
charset="utf-8">
Tomcat version 8 is used
Server version: Apache Tomcat/8.0.15
JVM Version: 1.7.0_51-b13
JVM Vendor: Oracle Corporation
Also have as java parameters
-Dfile.encoding=UTF-8 and
-Djavax.servlet.request.encoding=UTF-8
In server.xml
<Connector connectionTimeout="20000" port="8089" protocol="HTTP/1.1"
redirectPort="8443" URIEncoding="UTF-8" useBodyEncodingForURI="true" />
In web.xml in conf folder
<filter>
<filter-name>setCharacterEncodingFilter</filter-name>
<filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter
-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
<filter-name>setCharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
In web.xml of the application
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<page-encoding>UTF-8</page-encoding>
<trim-directive-whitespaces>true</trim-directive-whitespaces>
</jsp-property-group>
</jsp-config>
<filter>
<filter-name>setCharacterEncodingFilter</filter-name>
<filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter
-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>setCharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
But I still get this warning
Codepage iso-8859-1 from (HTTP header) overrides conflicting codepage utf-8
from (META tag)
I tried to move/change the order of the filters for setting encoding but
doesn't seem to make any difference.
I cannot figure out what is wrong and why the http header is saying
iso-8859-1 encoding instead of utf-8. I need utf-8 cause this application
need to support Japanese language.
I welcome anyone to give me any suggestion/comments/or pointers on what I am
doing wrong.
With regards
Prabhu
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org