You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Nanduri, Amarnath" <Am...@Agilquest.com> on 2001/03/05 16:36:19 UTC

alternate flow control

In the sample application that's part of the Struts distribution, there are
two additional attributes in action.xml - success and failure. These
attributes define which JSP page should be forwarded to which request based
on a success and failure condition of the validate method of the ActionForm
class......


 My question is..
Can i specify alternate flows in the structs-config.xml file (where i
declare the action classes and the success/failure flow) so that based on
the business logic (or security realm), i can send the user to different
pages ? 


cheers,
Amar..

Re: alternate flow control

Posted by Martin Cooper <ma...@tumbleweed.com>.
The names "success" and "failure" are arbitrary. You can actually define as
many forwards as you like, with whatever names you like, to go to wherever
you like.

The path does not have to refer to a JSP file, either. For instance, the
Struts example shows the use of a forward for which the path refers to a
Struts Action and also includes a query string.

Hope this helps.

--
Martin Cooper

----- Original Message -----
From: "Nanduri, Amarnath" <Am...@Agilquest.com>
To: <st...@jakarta.apache.org>
Sent: Monday, March 05, 2001 7:36 AM
Subject: alternate flow control


>
> In the sample application that's part of the Struts distribution, there
are
> two additional attributes in action.xml - success and failure. These
> attributes define which JSP page should be forwarded to which request
based
> on a success and failure condition of the validate method of the
ActionForm
> class......
>
>
>  My question is..
> Can i specify alternate flows in the structs-config.xml file (where i
> declare the action classes and the success/failure flow) so that based on
> the business logic (or security realm), i can send the user to different
> pages ?
>
>
> cheers,
> Amar..