Examples: autoRequestEncoding and autoResponseEncoding encoding examples

The default value of the autoRequestEncoding and autoResponseEncoding extensions is false, which means that both the request and response character encoding is set to the Servlet 2.3 Specification default of ISO-8859-1. Different character encodings are possible if the client defines character encoding in the request header, or if the code includes the setCharacterEncoding(String encoding) method. Also, If the value is set to false for a response, the Web container cannot set a response content type.

If the autoRequestEncoding value is set to true, and the client did not specify character encoding in the request header, and the code does not include the setCharacterEncoding(String encoding) method, the Web container tries to determine the correct character encoding for the request parameters and data.

The Web container performs each step in the following list until a match is found...

If the autoResponsetEncoding value is set to true, and the client did not specify character encoding in the request header, and the code does not include the setCharacterEncoding(String encoding) method, the Web container does the following...

 

See Also

autoRequestEncoding and autoResponseEncoding
Internationalization
Webapplications: Resources for learning