You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Robby Atchison <ro...@msn.com> on 2010/01/30 05:37:19 UTC

redirectAction not working

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

Rob_26@msn.com


Re: redirectAction not working

Posted by Paweł Wielgus <po...@gmail.com>.
Hi Robby,
some kind of a misspel or wrong case somewhere,
or a situation where You have VerySimpleAction.java and verySimple.jsp
which should be very-simple.jsp (in convention mode). Try to add new
action and a result for it, if it will work, then look for changes
between these two.

Best greetings,
Pawel Wielgus.

2010/1/31, Robby Atchison <ro...@msn.com>:
> Thanks for the suggestion.  The configbrowser plugin indicates there are no
> results for the action in question.  The question is why.
>
> Thanks,
> Rob
>
> -----Original Message-----
> From: Paweł Wielgus [mailto:poulwiel@gmail.com]
> Sent: Saturday, January 30, 2010 6:03 AM
> To: Struts Users Mailing List
> Subject: Re: redirectAction not working
>
> Hi Rob,
> you might try ConfigBrowserPlugin,
> see why here:
> http://poulwiel.blogspot.com/2009/09/config-browser-plugin-in-struts2.html
>
> Best greetings,
> Paweł Wielgus.
>
>
> 2010/1/30 Robby Atchison <ro...@msn.com>:
>> 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
>>
>> Rob_26@msn.com
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: redirectAction not working

Posted by Robby Atchison <ro...@msn.com>.
Thanks for the suggestion.  The configbrowser plugin indicates there are no results for the action in question.  The question is why.

Thanks,
Rob

-----Original Message-----
From: Paweł Wielgus [mailto:poulwiel@gmail.com] 
Sent: Saturday, January 30, 2010 6:03 AM
To: Struts Users Mailing List
Subject: Re: redirectAction not working

Hi Rob,
you might try ConfigBrowserPlugin,
see why here:
http://poulwiel.blogspot.com/2009/09/config-browser-plugin-in-struts2.html

Best greetings,
Paweł Wielgus.


2010/1/30 Robby Atchison <ro...@msn.com>:
> 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
>
> Rob_26@msn.com
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: redirectAction not working

Posted by Paweł Wielgus <po...@gmail.com>.
Hi Rob,
you might try ConfigBrowserPlugin,
see why here:
http://poulwiel.blogspot.com/2009/09/config-browser-plugin-in-struts2.html

Best greetings,
Paweł Wielgus.


2010/1/30 Robby Atchison <ro...@msn.com>:
> 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
>
> Rob_26@msn.com
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org