Doesn’t look like a problem to me… The value in the URL is URL-encoded. Assuming the encoding is correct, you’re getting the decoded value. You won’t have access to the original encoded value because the servlet container will decode it automagically…
What encoding is used for GET parameters is server dependent. Jetty apparently uses UTF-8 by default (the test works fine in Jetty but “fails” in Tomcat in the described way)
Tomcat will use ISO-8859-1 as the default character encoding of the entire URL, including the query string (“GET parameters”).
There are two ways to specify how GET parameters are interpreted:
Set the URIEncoding attribute on the element in server.xml to something specific (e.g. URIEncoding=“UTF-8”).
Set the useBodyEncodingForURI attribute on the element in server.xml to true. This will cause the Connector to use the request body’s encoding for GET parameters.
Other servers than Tomcat may by default interpret GET parameters using a different encoding