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
JSP
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.
This tag has the following attributes for which the Required value is “No”:
Name to save the catalog on the page context. This is also the name for the scripting variable.
Name to use to retrieve the catalog from the page context.
Resource name to locate the message catalog.
None.
<%-- 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") %>