You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "David C. Hicks" <dh...@i-hicks.org> on 2008/09/15 19:24:23 UTC
Action redirect?
What's the proper way to configure an action to call another action upon
success? I've tried this...
<action name="remove" method="remove" class="siteAction">
<result>list.action</result>
</action>
This doesn't work. It says it cannot find the URI. In this case
"/quickstart/site/list.action" (this is based on the quickstart example).
I also tried...
<action name="remove" method="remove" class="siteAction">
<result type="redirectAction">list</result>
</action>
This actually fails to compile, complaining about there not being a type
"redirect" mapped to name "success". The documentation is silent on
this type, though.
Any help?
Thanks,
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Action redirect?
Posted by Lukasz Lenart <lu...@googlemail.com>.
Hi
2008/9/16 Narayana S <na...@gmail.com>:
> is your remove method is returning SUCCESS? if yes .. you need to give
> result name also as...
> <action name="remove" method="remove" class="siteAction">
> <result type="redirectAction" name="success">list</result>
>
>> </action>
Not exactly, SUCCESS is the default result name so below example will
also work as expected
>> <action name="remove" method="remove" class="siteAction">
>> <result type="redirectAction">list</result>
>> </action>
Regards
--
Lukasz
http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Action redirect?
Posted by Narayana S <na...@gmail.com>.
is your remove method is returning SUCCESS? if yes .. you need to give
result name also as...
<action name="remove" method="remove" class="siteAction">
<result type="redirectAction" name="success">list</result>
> </action>
On Mon, Sep 15, 2008 at 10:54 PM, David C. Hicks <dh...@i-hicks.org> wrote:
> What's the proper way to configure an action to call another action upon
> success? I've tried this...
>
> <action name="remove" method="remove" class="siteAction">
> <result>list.action</result>
> </action>
>
> This doesn't work. It says it cannot find the URI. In this case
> "/quickstart/site/list.action" (this is based on the quickstart example).
>
> I also tried...
>
> <action name="remove" method="remove" class="siteAction">
> <result type="redirectAction">list</result>
> </action>
>
> This actually fails to compile, complaining about there not being a type
> "redirect" mapped to name "success". The documentation is silent on this
> type, though.
>
> Any help?
> Thanks,
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Action redirect? - SOLVED
Posted by "David C. Hicks" <dh...@i-hicks.org>.
Turns out I was pulling an older version of Struts and the action
redirect was spelled differently back then.
David C. Hicks wrote:
> What's the proper way to configure an action to call another action
> upon success? I've tried this...
>
> <action name="remove" method="remove" class="siteAction">
> <result>list.action</result>
> </action>
>
> This doesn't work. It says it cannot find the URI. In this case
> "/quickstart/site/list.action" (this is based on the quickstart
> example).
>
> I also tried...
>
> <action name="remove" method="remove" class="siteAction">
> <result type="redirectAction">list</result>
> </action>
>
> This actually fails to compile, complaining about there not being a
> type "redirect" mapped to name "success". The documentation is silent
> on this type, though.
>
> Any help?
> Thanks,
> Dave
>
>
> ---------------------------------------------------------------------
> 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