...
Tomcat will use ISO-8859-1 as the default character encoding of the entire URL, including the query string ("GET parameters") (though see Tomcat 8 notice below).
There are two ways to specify how GET parameters are interpreted:
- Set the
URIEncoding
attribute on the <Connector> element in server.xml to something specific (e.g.URIEncoding="UTF-8"
). - Set the
useBodyEncodingForURI
attribute on the <Connector> element in server.xml totrue
. This will cause the Connector to use the request body's encoding for GET parameters.
In Tomcat 8 starting with 8.0.0 (8.0.0-RC3, to be specific), the default value of URIEncoding
attribute on the <Connector> element depends on "strict servlet compliance" setting. The default value (strict compliance is off) of URIEncoding
is now UTF-8
. If "strict servlet compliance" is enabled, the default value is ISO-8859-1
.
References: Tomcat 7 HTTP Connector, Tomcat 7 AJP Connector, Tomcat 8 HTTP Connector, Tomcat 8 AJP Connector
Anchor | ||||
---|---|---|---|---|
|
...