Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

- Previous: Part I Developing and Deploying Applications
- Next: Virtual Servers

## Internationalization Issues

This section covers internationalization as it applies to the following:

- The Server

- Servlets

### The Server

To set the default locale of the entire Application Server, which determines the locale of the Administration Console, the logs, and so on, use the Administration Console. Select the Domain component, and type a value in the Locale field. For details, see the Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Administration Guide.

### Servlets

This section explains how the Application Server determines the character encoding for the servlet request and the servlet response. For encodings you can use, see `http://java.sun.com/j2se/1.4/docs/guide/intl/encoding.doc.html`.

#### Servlet Request

When processing a servlet request, the server uses the following order of precedence, first to last, to determine the request character encoding:

- The ```getCharacterEncoding()` method.

- A hidden field in the form, specified by the `form-hint-field` attribute of the `parameter-encoding` element in the `sun-web.xml` file.

- The character encoding set in the `default-charset` attribute of the `parameter-encoding` element in the `sun-web.xml` file.

- The default, which is `ISO-8859-1`.

For details about the `parameter-encoding` element, see parameter-encoding.

#### Servlet Response

When processing a servlet response, the server uses the following order of precedence, first to last, to determine the response character encoding:

- The `setCharacterEncoding()` or ```setContentType()` method.

- The ```setLocale()` method.

- The default, which is `ISO-8859-1`.

- Previous: Part I Developing and Deploying Applications
- Next: Virtual Servers

- © 2010, Oracle Corporation and/or its affiliates