Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

catalog

Description

This tag loads a message catalog specified by the resource attribute and makes it available to the page. A message catalog is a java.util.ResourceBundle object that is locale-specific. Also see the msg tag

Tag Body

JSP

Restrictions

The id attribute is used to make the message catalog available after the catalog end tag. The name attribute is used to make a previously create catalog available. This tag also makes a scripting variable, specified by the id attribute available. Use the getMsg(String key) method to get the message string.

Attributes

This tag has the following attributes for which the Required value is “No”:

id

Name to save the catalog on the page context. This is also the name for the scripting variable.

name

Name to use to retrieve the catalog from the page context.

resource

Resource name to locate the message catalog.

Properties

None.

Example(s)
<%-- get key 'message' from catalog 'sample' --%>
<util:catalog resource="sample">
Message = <util:msg key="message"/>
</util:catalog>

<%-- get key from a named catalog --%>
<util:catalog id="sample" resource="sample"/>
...
Message = <util:msg name="sample" key="message"/>

<%-- get key using scripting --%>
<util:catalog id="sample" resource="sample"/>
...
Message = <%= sample.getMsg("message") %>