Craig McClanahan wrote:
* Regarding chaining of actions themselves, if you are using the standard request processing chain that remains as bad an idea as it has always been in Struts, and I don't see any reason to make it easier with chaining than it is today.
Hi Craig. I was hoping you could explain 1) how people typically chain actions in struts 2) why it is a bad idea
I have some ideas for answers to both questions but I'd like to hear what you think.
Here's a page in the Wiki about this eternal question: http://wiki.apache.org/struts/ActionChaining
To chain actions, you simply return a non-redirect ActionForward which points to a Struts action path. This is chaining (where a redirect isn't) because it results in the ActionServlet triggering a second "run" through the RequestProcessor's processing flow.
This can have some unexpected side effects, which is one reason it's not considered "supported behavior". Also, as Ted notes on the references Wiki pages, when people chain actions, it is often (though not always) because they haven't got a clean controller architecture.
I notice that the email from Craig included in that page is over two years old and heavily references the transition from Struts 1.0 to Struts 1.1; is that still useful this far on?
I'm not sure who the "I" is in the lead-in to that page is.
Joe
--
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