uCosminexus Application Server, Web Container Functionality Guide
In the locations where the character encoding settings defined in the Servlet specifications exist, the default character encoding set up on Application Server is disabled.
This subsection describes the character encoding settings defined in the Servlet specifications. Note that the character encoding settings depend on the version of the Servlet specifications.
The following table describes the character encoding setting method defined in the Servlet specifications for each Servlet/JSP version:
Table 2-20 Character encoding setting method defined in the Servlet specifications (Servlet 2.5, 3.0/JSP 2.1)
Setting contents | Setting location | Setting method in the Servlet specifications |
---|---|---|
Character encoding of request | Servlet | ServletRequest.setCharacterEncoding(java.lang.String env)#1 |
JSP files | None | |
Character encoding of response | Servlet |
|
JSP files |
|
|
Character encoding of JSP file | JSP files |
|
Table 2-21 Character encoding setting method defined in the Servlet specifications (Servlet 2.4/JSP 2.0)
Setting contents | Setting location | Setting method in the Servlet specifications |
---|---|---|
Character encoding of request | Servlet | ServletRequest.setCharacterEncoding(java.lang.String env)#1 |
JSP files | None | |
Character encoding of response | Servlet |
|
JSP files |
|
|
Character encoding of JSP file | JSP files |
|
Table 2-22 Character encoding setting method defined in the Servlet specifications (Servlet 2.3/JSP 1.2)
Setting contents | Setting location | Setting method in the Servlet specifications |
---|---|---|
Character encoding of request | Servlet | ServletRequest.setCharacterEncoding(java.lang.String env)#1 |
JSP files | None | |
Character encoding of response | Servlet |
|
JSP files | contentType attribute value of the Page directive (including charset) | |
Character encoding of JSP file | JSP files |
|
If the character encoding settings in the Servlet specifications and the default character encoding settings in Application Server do not exist, the character encoding defined in the Servlet specifications is applied.
When the character encoding is not specified, the following character encoding that are defined in the Servlet specifications will be applied:
Table 2-23 Character encoding defined in the Servlet specifications (Response)
Servlet version | Types | Applied character encoding |
---|---|---|
Servlet 2.3 | Servlet | ISO-8859-1 |
JSP page | ||
JSP document | ||
Servlet 2.4 or later | Servlet | ISO-8859-1 |
JSP page | ||
JSP document | UTF-8 |
Table 2-24 Character encoding defined in the Servlet specifications (JSP file)
Servlet version | JSP version | Types | Applied character encoding |
---|---|---|---|
Servlet 2.3 | JSP 1.2 | JSP page | ISO-8859-1 |
JSP document | |||
Servlet 2.4 or later | JSP 2.0, 2.1 | JSP page | ISO-8859-1 |
Standard format tag file | |||
JSP document | UTF-8 | ||
XML tag file |
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.