Hi all/ Dear André Warnier, I understand that I cannot ask questions or help without actually telling what I did so resolve the issue in the first place.
Initially I followed this http://wiki.apache.org/tomcat/FAQ/CharacterEncoding I wanted to get the minimal setting which would help, some of the things I found is that few of the jsp pages itself was encoded differently and not utf-8 and once I fixed that it do not completely worked. After lots of trial and error, Two settings which worked for me are by adding contenttype tag in jsp page <%@ page contentType="text/html; charset=UTF-8" %> And in server.xml <Connector connectionTimeout="20000" port="8089" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8" /> Before changes to config prabhu@dev01 ~ $ curl -I http://localhost:8088/xxxx/user/index.action HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=5CB483D8DC5F2C574DBDDE1E102763EC; Path=/xxxxx/; HttpOnly Content-Type: text/html;charset=ISO-8859-1 Content-Length: 3863 Date: Fri, 23 Jan 2015 09:14:43 GMT After changes to config prabhu@dev01 ~ $ curl -I http://localhost:8088/ xxxx /user/index.action HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=7CBEAE0ACCEB65FAF92CF6D94BF0FEDD; Path=/ xxxx /; HttpOnly Content-Type: text/html;charset=UTF-8 Content-Length: 3868 Date: Fri, 23 Jan 2015 09:15:12 GMT With regards Prabhu -----Original Message----- From: André Warnier [mailto:a...@ice-sa.com] Sent: Friday, 23 January, 2015 4:10 PM To: Tomcat Users List Subject: Re: Tomcat 8 encoding issues: unable to change the default encoding iso-8859-1 to utf-8 in http header 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 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org