Sun GlassFish Enterprise Server v3 Prelude Application Deployment Guide

locale-charset-map

Maps locales and agents to character encodings. Provided for backward compatibility. Used only for request processing. Used only if the character encoding is not specified in the request and cannot be derived from the optional parameter-encoding element. For encodings, see http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html.

Superelements

locale-charset-info (sun-web.xml)

Subelements

The following table describes subelements for the locale-charset-map element.

Table A–44 locale-charset-map Subelements

Element 

Required 

Description 

description

zero or one 

Specifies an optional text description of a mapping. 

Attributes

The following table describes attributes for the locale-charset-map element.

Table A–45 locale-charset-map Attributes

Attribute 

Default 

Description 

locale

none 

Specifies the locale name. 

agent

none 

(optional) Specifies the type of client that interacts with the application server. For a given locale, different agents can have different preferred character encodings. The value of this attribute must exactly match the value of the user-agent HTTP request header sent by the client. See Table A–46 for more information.

charset

none 

Specifies the character encoding to which the locale maps. 

Example Agents

The following table specifies example agent attribute values.

Table A–46 Example agent Attribute Values

Agent 

user-agent Header and agent Attribute Value

Internet Explorer 5.00 for Windows 2000 

Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Netscape 4.7.7 for Windows 2000 

Mozilla/4.77 [en] (Windows NT 5.0; U)

Netscape 4.7 for Solaris 

Mozilla/4.7 [en] (X11; u; Sun OS 5.6 sun4u)