html
Tag messages


Conditionally display a set of accumulated messages.

Displays a set of messages prepared by a business logic component and stored as an ActionMessages object, ActionErrors object, a String, or a String array in any scope. If such a bean is not found, nothing will be rendered. The messages are placed into the page scope in the body of this tag where they can be displayed by standard JSP methods. (For example: <bean:write>,<c:out>)

In order to use this tag successfully, you must have defined an application scope MessageResources bean under the default attribute name.



Tag Information
Tag Classorg.apache.struts.taglib.html.MessagesTag
TagExtraInfo Classorg.apache.struts.taglib.html.MessagesTei
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
idtruefalsejava.lang.StringThe name of a page scope JSP bean that will contain the current element of the collection of messages on each iteration, if it is not null.
bundlefalsetruejava.lang.StringThe servlet context attribute key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet.
localefalsetruejava.lang.StringThe session attribute key for the Locale used to select messages to be displayed. If not specified, defaults to the Struts standard value.
namefalsetruejava.lang.StringName of the bean in any scope under which our messages have been stored. If not present, the name specified by the Globals.ERROR_KEY constant string will be used.
propertyfalsetruejava.lang.StringName of the property for which messages should be displayed. If not specified, all messages (regardless of property) are displayed.
headerfalsetruejava.lang.StringThis value is an optional message resource key that will be printed before the iteration of messages begins.
footerfalsetruejava.lang.StringThis value is an optional message resource key that will be printed after the iteration of messages has finished.
messagefalsetruejava.lang.StringBy default the tag will retrieve the bean it will iterate over from the Globals.ERROR_KEY constant string, but if this attribute is set to 'true' the bean will be retrieved from the Globals.MESSAGE_KEY constant string. Also if this is set to 'true', any value assigned to the name attribute will be ignored.

Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.