I am not getting action error, when I am using dispatcher
result in Struts 2.
In action class, the below code is used to add error message.
addActionError("Error");
return "Failure";
In Struts config:
...
<result name="Failure" type="dispatcher">/ShowError.do</result>
...
<action name="ShowError">
<result>/jsp/ShowActionErrror.jsp</result>
</action>
In ShowActionErrror.jsp
:
<div class="error"><s:actionerror /></div>
But, I am not getting action error message in ShowActionErrror.jsp
?