Jetty default encoding

Marvin Addison marvin.addison at gmail.com
Wed Jun 4 16:44:34 EDT 2014


> There doesn't appear to be a simple connector property like Tomcat has to
> universally switch things to UTF-8.

You mean URIEncoding="UTF-8"? Assuming yes, then in my experience
that's not sufficient in some cases to change the encoding globally to
UTF-8. The recipe that worked for us was a combination of pageEncoding
JSP directive, specifying charset=UTF-8 in the content-type header,
and a servlet filter that set both request and response encoding [1].
I believe only the servlet filter is strictly required, but we set
_everything_ to UTF-8 to be safe since it's little trouble.

M

[1] http://docs.spring.io/spring/docs/3.2.8.RELEASE/javadoc-api/org/springframework/web/filter/CharacterEncodingFilter.html


More information about the dev mailing list