<fmt:requestEncoding> Tag
The <fmt:requestEncoding> tag is used to specify the form encoding type returned to the web application.
Syntax
<fmt:requestEncoding value="<string>"/>
Attributes
The <fmt:requestEncoding> tag has the following attributes:| Attribute | Description | Required | Default Value |
|---|---|---|---|
| key | The name of the character encoding used to decode request parameters | Yes | None |
Use the <fmt:requestEncoding> tag to specify the character set used to decode data from a form. This tag must be used when the character set is not ISO-8859-1. This tag is needed because most browsers do not include a Content-Type header in their requests.
The purpose of the <fmt:requestEncoding> tag is to specify the Content-Type of the request. You must specify a Content-Type even if the response is encoded via the contentType attribute of the Page directive. This is because the actual locale of the response may differ from that specified by the Page directive.
If the page contains I18N-capable formatting actions that set the locale attribute of the response (by calling the ServletResponse.setLocale() method), any encoding specified in the page will be overridden.
Examples
Example
The output is as follows:
Uno Dos Tres
Other Extensions
JSP Standard Tag Library