struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dakota Jack" <>
Subject Re: Is Action Chaining Strongly Discouraged?
Date Wed, 03 May 2006 17:48:38 GMT
You do it by redefining the form relation to the action so that a form
acts as a passage between actions Action1 --> Form12 --> Action2. 
Using action chaining is horrible.  Look at the code and you will see

On 4/30/06, David Evans <> wrote:
> below...
> On Sun, 2006-04-30 at 17:47 -0500, Joe Germuska wrote:
> > On 4/30/06, Caroline Jen <> wrote:
> > >I have seen some discussions on this forum regarding
> > >action chaining.  Primarily, the advices are to think
> > >through the business logic before making decision on
> > >chaining actions.
> > >
> > >What are the disadvantages of action chaining?  Why
> > >action chaining is not a good practice?
> >
> >
> >
> > As noted in that page, ActionChaining is using Struts in a way which
> > often works, but for which it was not specifically designed.  It's
> > possible that you might run into some odd situations where the
> > assumption that a single HttpRequest results in only a single pass
> > through the RequestProcessor causes something to go wrong.
> >
> > I usually just refactor my app when I find myself wanting to use
> > action chaining, but many people just do it and find that it works.
> >
> > Joe
> How do you handle the population of the contexts which are passed to the
> jsp to which you are forwarding? The one use of chaining that seems to
> make sense to me is the forwarding to a setup action that prepares the
> contexts with whatever objects the jsp may need to display. I have heard
> people say that this setup functionality should be moved to its own
> method in the business layer that could then be called by the forwarding
> action, but how does this actually look? The objects have to be put in a
> web tier context object, how do you keep that layer away from the
> business tier?
> Is there a reason you don't use the two action (setup and submit)
> approach?
> I'm in the process of learning webwork and while i'm at it i'm trying to
> decide on best practices for action architecture. Webwork makes the two
> action thing even easier, because you can specify a method to call on an
> action class in the action mapping, so the setup and submit handling
> methods can exist in the same action class. or you can even specify the
> method to call on an action class in the url using the ! character, as
> in /customer!setup.action.
> any advice or insight would be appreciated.
> dave
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message