Hello,
I have the following configuration in a Struts.xml file. The
paramsPrepareParamsStack is the default interceptor stack. AccountAction
does not implement any interfaces. Both BankcardAction and ECheckAction
implement Preparable and ModelDriven.
<action name="account"
class="com.epa.actions.AccountAction">
<result name="bankcard_browse" type="redirectAction">
<param name="action">bankcard_browse</param>
</result>
<result name="echeck_browse" type="redirectAction">
<param name="action">echeck_browse</param>
</result>
</action>
<action name="bankcard_*" method="{1}"
class="com.epa.actions.BankcardAction" >
<result name="success">bankcarddetail.tile</result>
<result name="input">bankcarddetail.tile</result>
</action>
<action name="echeck_*" method="{1}"
class="com.epa.actions.ECheckAction" >
<result name="success">echeckdetail.tile</result>
<result name="input">echeckdetail.tile</result>
</action>
Below is the execute method from AccountAction class..
public String execute() {
String actionName = "bankcard_browse";
if (StringUtils.equalsIgnoreCase(recordType, "EC")) {
actionName = "echeck_browse";
}
return actionName;
}
In my testing I get the error - No result defined for action
com.epa.actions.AccountAction and result bankcard_browse. I can navigate
straight to bankcard_browse (not going through AccountAction) without
incident. If I try to go to AccountAction first and redirect to
bankcard_browse or echeck_browse I get the error. What am I doing wrong?
I'm using Struts 2 version 2.1.8.1., Tiles 2.0.6, OGNL 2.7.3. I hope I've
included enough information. Any help will be greatly appreciated as I've
been struggling with this problem for too long.
Best regards,
Rob
[email protected]