message
Implements a body tag allowing the usage of a resource bundle to internationalize content in a web page. The key attribute is required, and is used to look up content in the resource bundle. The args attribute is optional, and if present, provides items to pass to a MessageFormat. The bundle tag must be used first in order to ensure that the proper bundle is loaded.
Library
Tag class
org.apache.taglibs.i18n.MessageTag
Attributes
Table 8-20 lists and describes the attributes for message.
Table 8-20 Attributes for message An array of arguments for use with java.text.MessageFormat when formatting the display text. Object reference to the ResourceBundle in which the key can be found. Key to use when retrieving the display message format from the ResourceBundle.Used in
<context root>\errors\pagenotfound.jsp
Variables
Table 8-21 describes the variable for message.
Table 8-21 Variable for message id allows other tags or scriptlets to access the String created by this tag. If id is specified the String is not printed by this tag, just stored into the id.Example
The following example displays a plain message using the default (first defined) bundle:
The next example displays a plain message using a specified bundle. In this example the default bundle is bundle1 because it is defined first:
(c) Copyright Actuate Corporation 2011 |
![]() |