<action name="saveGetStarted" class="com.sample.action.GetStartedAction" method="save">
<interceptor-ref name="defaultStack"/>
<result name="success" type="redirect-action">
<param name="actionName">preQualification</param>
<param name="customerId">${customerId}</param>
</result>
<result name="input">/jsp/getStarted.jsp</result>
<result name="error">/jsp/getStarted.jsp</result>
</action>
<action name="preQualification" class="com.sample.action.PreQualificationAction">
<result name="success">/jsp/preQualification.jsp</result>
<result name="input" >/jsp/preQualification.jsp</result>
</action>
With struts2-core-2.0.12.jar
it works fine, but after the update to struts2-core-2.1.6.jar
, I get the following error:
Caused by: There is no result type defined for type 'redirect-action' mapped with name 'success'. Did you mean 'redirectAction'? - result - file:/D:/eclipse-indigo/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Fundation/WEB-INF/classes/struts.xml:19:54
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:613)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:364)
... 26 more
What is causing the error?
You are using old notation for action redirect result. Change redirect-action
to redirectAction
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With