I have never had a reason to do this, and I could do it through a formbean, but I want to pass control to another action and set the parameter values. How would I do this from within the originating action? Sorry if this is obvious, but then everything is to someone, grin. tia.
The easiest is to define a forward that points to the second action.
Note that action chaining is *strongly* discouraged. Searching the web for "struts +action chaining" turns up a number of references which may or may not be helpful depending on what you're actually trying to accomplish.
Joined: Aug 27, 2005
Thanks. Yes, I know that is a gauche hack, however what design would you recommend? I have an action/form bean process from which I want to call another action/form bean process. Is it as simple as include the params of action2 in formbean 1 and just set them in action1?
Ideally, actions are a relatively thin layer between web and business logic. If business logic is wrapped up in reasonable ways it's as easy as using the same business logic in the action in question rather than running the request through another action. I have yet to run across a legitimate reason to chain actions, but that could just be a consequence of the particular apps I've written.
There are a few ways to chain actions in S1; the search query I offered before turns up most (or all?) of them.