How can I test if a specific action message in present in context?
<logic:messagesPresent message="error" property="my_error">
<table>
<tr>
<td>
<html:messages id="error" property="my_error">
<bean:write name="error"/><br>
</html:messages>
</td>
</tr>
</table>
</logic:messagesPresent>
I tried this, but I need to search only my_error message.
<s:if test="hasActionMessages()">
<table>
<tr>
<td >
<s:actionmessage/>
</td>
</tr>
</table>
</s:if>
Action messages are not errors, and they hold a separate collection. It could be served regardless of validation status of the action.
Action messages more appropriate for the user feedbacks because it won't affect the flow. On the other hand action errors make the action invalid.
<s:if test="hasActionMessages()">
<table>
<tr>
<td >
<s:actionmessage/>
</td>
</tr>
</table>
</s:if>