How can I specify the encoding of HTTP request parameters?GlassFish treats the encoding of a request's URI separately from the encoding of its parameters. In the case of a GET request, query parameters are appended to the URI (separated by <code>?</code>), whereas in the case of a POST request, they are carried inside the request body. The two types of encoding are specified in different places:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd">
<sun-web-app>
<locale-charset-info default-locale="">
<locale-charset-map locale="" charset=""/>
<parameter-encoding default-charset="UTF-8"/>
</locale-charset-info>
</sun-web-app>
See also this FAQ entry. |