struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leonardo aramaki <>
Subject How to map a wildcard-matched method to an exception?
Date Fri, 02 Jul 2010 17:25:15 GMT

I'm working with Struts, JDK 1.6.0_17, with container WASCE 2.1 on
Windows 7 Pro.

Here's a snippet of my struts.xml file:



<constant name="struts.devMode" value="true" />


<action name="*test" class="fend.config.TestAction" method="{1}">
            <exception-mapping result="fail"
            <result name="success">/registerCrisis.jsp</result>
            <result name="dummy">/dummy.jsp</result>
            <result name="fail">/error.jsp</result>
            <interceptor-ref name="configStack"/>

When I run the application as:
http://localhost:8080/appContext/viewtest.action, struts calls the view
method in the TestAction class. In the view method I put a code that
generates a *java.lang.UnsupportedOperationException* just for testing

What I intended was to redirect to the result named fail, so that error.jsp
is exhibited. But it does not redirect to the page. What I've missed?

Thank you.

Leonardo Aramaki

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message