Logic: the messagespresent label is used in the following situations:
There is an actionmessages object in the request scope. The property of the tag corresponds to the property in actionmessages.
There is an actionerrors object in the request scope. The property attribute of the tag corresponds to the property in actionerrors.
There is a string object, which is converted (constructed) into actionmessage and then added to actionmessages.
There is a string array object that converts every string in the array into an actionmessage and adds it to actionmessages.
When the message attribute value of the tag is true. message_key is the key used to find the message in the request scope. In other cases, the value of name is used as the key for searching. If the name does not appear, the default value is globals. error_key.
The following code demonstrates the typical usage of the logic: messagespresent Tag:
<Logic: messagespresent>
<Ul>
<HTML: messages id = "message">
<Li> <Bean: write name = "message"/> </LI>
</Html: messages>
</Ul>
</Logic: messagespresent>
The application of the label logic: messagesnotpresent is exactly the opposite of the Application of logic: messagespresent.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/AWUSOFT/archive/2008/05/16/2452874.aspx