I guess I'll post the obligatory "that isn't considered a good idea" message. Clearly, you've gotten feedback from people who do it, so I can't just tell you that it doesn't work. However, I can tell you that Struts was never designed to for action forwarding, and by forwarding from one action to another, you trigger a second complete pass through the entire RequestProcessor cycle, which can sometimes have unexpected effects on the request context.

So, while action chaining sometimes works for some people in some cases, Struts wasn't designed to do it, and bugs relating to it are considered "invalid".

There are usually other ways to achieve the same goal, especially if you are being conscientious about putting your business logic in a layer that is relatively independent of Struts and keeping Struts focused on translating HTTP requests into business requests and making calls against your business layer.

Note also that the Struts RequestProcessor is evolving into a more flexibly composable "chain" model of request processing. Once that code is merged into the main branch of development, you may find that it provides a way that you could line up multiple action executions without triggering all of the pre-processing that comes before the action execution. This isn't something anyone has tackled yet, but the basic changes to the design make it something much more readily achievable.

The Chain-based request processor is currently in Struts contrib, and is thoroughly usable already, and Don Brown has said he may find time this weekend (or soon) to change the development Struts code to use it as the standard processing mechanism.

Joe



At 3:40 PM +0530 10/15/04, sachin wrote:
> Have the first action's success forward on to the next action in
struts config.

but will the same bean be populated ?

Regards ,
sachin


---------- Original Message ----------- From: "McCormack, Chris" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Fri, 15 Oct 2004 10:42:04 +0100 Subject: RE: help : chaining actions in Struts

 Have the first action's success forward on to the next action in
 struts config.

 Chris McCormack

 -----Original Message-----
 From: sachin [mailto:[EMAIL PROTECTED]
 Sent: 15 October 2004 10:46
 To: Struts Users Mailing List
 Subject: help : chaining actions in Struts

 hi all ,

 i have a common bean , which i need to use for two Actions classes
 which will execute one after another and populate the bean.

 Now how can i configure the struts so that both the action will run
 one after another ?

 Any help is welcome . .

 Regards,
 Sachin Hegde

 ---------------------------------------------------------------------
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 ***********************************************
 This e-mail and its attachments are confidential
 and are intended for the above named recipient
 only. If this has come to you in error, please
 notify the sender immediately and delete this
 e-mail from your system.
 You must take no action based on this, nor must
 you copy or disclose it or any part of its contents
 to any person or organisation.
 Statements and opinions contained in this email may
 not necessarily represent those of Littlewoods.
 Please note that e-mail communications may be monitored.
 The registered office of Littlewoods Limited and its
 subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
 Registered number of Littlewoods Limited is 262152.
 ************************************************

 ---------------------------------------------------------------------
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
------- End of Original Message -------


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place."
- Carlos Santana


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to