2011/1/1 <vwu98...@lycos.com>: > * <%...@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%> on > the first line of JSP files > * <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
I'd recommend <meta http-equiv="Content-Type" content="<%=response.getContentType()%>"> to make sure that the HTTP Content-Type header and <META> tag contents were in sync. >> * An encoding filter for utf-8. > > Can you expand on that ? > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > The code can be found on the follow page: > > http://www.devdaily.com/java/jwarehouse/spring-framework-2.5.3/src/org/springframework/web/filter/CharacterEncodingFilter.java.shtml > > and the configuration in web.xml is the following: > > <filter> > <filter-name>CharacterEncodingFilter</filter-name> > <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> > <init-param> > <param-name>encoding</param-name> > <param-value>UTF-8</param-value> > </init-param> > <init-param> > <param-name>forceEncoding</param-name> > <param-value>true</param-value> > </init-param> > </filter> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++ This filter should have taken care of encodings for POSTs. Though I am always using it with forceEncoding="false". Maybe you forgot to map this filter? (You may throw/catch an exception in your code and see, whether the filter is mentioned in the stack trace.) <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> Things will also broke if any getParameter() call happens before the filter. (As it will trigger parsing the body with whatever encoding is there at that moment). E.g., Tomcat's RequestDumperValve should not be used. How is your <FORM> element written on the web page? Is it a usual POST - you are not uploading files here (i.e., you are not setting "enctype" attribute in your <FORM>)? Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org