Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

There is no result type defined for type 'redirect-action' mapped with name 'success'

<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?

like image 741
jackyesind Avatar asked Dec 08 '22 17:12

jackyesind


1 Answers

You are using old notation for action redirect result. Change redirect-action to redirectAction.

like image 169
Aleksandr M Avatar answered Dec 11 '22 08:12

Aleksandr M