O'Reilly logo

JavaServer Pages, Second Edition by Hans Bergsten

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Integrating Custom I18N Actions

The default locale, resource bundle, and time zone for the JSTL I18N actions can be specified through four configuration settings, described in Tables Table 22-1 through Table 22-4.

Table 22-1. Locale configuration setting

Variable name:

javax.servlet.jsp.jstl.fmt.locale

Java constant:

Config.FMT_LOCALE

Java type:

String or java.util.Locale

Set by:

<fmt:setLocale>, context parameter, or custom code

Used by:

<fmt:bundle>, <fmt:setBundle>, <fmt:message>, <fmt:formatNumber>, <fmt:parseNumber>, <fmt:formatDate>, and <fmt:parseDate>

Table 22-2. Fallback locale configuration setting

Variable name:

javax.servlet.jsp.jstl.fmt.fallbackLocale

Java constant:

Config.FMT_FALLBACK_LOCALE

Java type:

String or java.util.Locale

Setby:

Context parameter or custom code

Used by:

<fmt:bundle>, <fmt:setBundle>, <fmt:message>, <fmt:formatNumber>, <fmt:parseNumber>, <fmt:formatDate>, and <fmt:parseDate>

Table 22-3. Localization context configuration setting

Variable name:

javax.servlet.jsp.jstl.fmt.localizationContext

Java constant:

Config.FMT_LOCALIZATION_CONTEXT

Java type:

String or javax.servlet.jsp.jstl.fmt.LocalizationContext

Set by:

<fmt:setBundle>, context parameter, or custom code

Used by:

<fmt:message>, <fmt:formatNumber>, <fmt:parseNumber>, <fmt:formatDate>, and <fmt:parseDate>

Table 22-4. Time zone configuration setting

Variable name:

javax.servlet.jsp.jstl.fmt.timeZone

Java constant:

Config.FMT_TIME_ZONE

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required