Name

<fmt:bundle>

Synopsis

The <fmt:bundle> action establishes a localization context for actions in its body. The localization context contains a locale and the best match for the specified resource bundle. The locale is either the locale defined by the locale configuration setting or the best match for the user preferences specified by the Accept-Language HTTP request header.

Syntax

<fmt:bundle basename="resourceBundleBasename" [prefix="keyPrefix"]>
  JSP elements
</fmt:bundle>

Attributes

Attribute name

Java type

Dynamic value accepted

Description

basename
String

Yes

The basename for a resource bundle, see java.util.ResourceBundle for details.

prefix
String

Yes

Prefix to be prepended to keys specified for nested <fmt:message> actions.

Example

                     <fmt:bundle basename="labels">
  <h1><fmt:message key="title" /></h1>
</fmt:bundle>

Get JavaServer Pages, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.