Hi,
I'm migrating my
Struts 1 app to Struts 2. In my Struts 2 app, I have an interceptor class that is meant to validate my error fields. It has this method to add action errors ...
private void addActionError(ActionInvocation invocation,
String message) {
Object action = invocation.getAction();
if(action instanceof ValidationAware) {
((ValidationAware) action).addActionError(message);
}
}
How do I display these on my
JSP? On my target JSP, I have this Struts 1 code (which is obviously invalid in Struts 2):
<logic:messagesPresent>
<div id="errorBlock" style="display: block;" class="module error hidden">
The following error has occurred:
<html:errors></html:errors>
<div class="clear"></div>
</div>
</logic:messagesPresent>
Thanks, - Dave