Hello,
I'm working with Struts2. Here's a snippet of my struts.xml file:
<action name="*test" class="fend.config.TestAction" method="{1}">
<exception-mapping result="fail" exception="java.lang.UnsupportedOperationException"/>
<result name="success">/registerCrisis.jsp</result>
<result name="dummy">/dummy.jsp</result>
<result name="fail">error.jsp</result>
<interceptor-ref name="configStack"/>
</action>
When I run the application like: http://localhost:8080/appContext/viewtest.action struts calls the view method in the TestAction class. I the view method I put code that generates a java.lang.UnsupportedOperationException just for testing purpose.
What I intended was to redirect to the result named fail, so that error.jsp is showned. But it's not redirecting to the page. What I've missed?
Thank you.