Hello Ɓukasz.

Thanks for the heads-up concerning the potential future of action chaining 
support.

The action chaining feature is still being utilized in at least one application 
I am aware of.

One of the potential reasons for using action chaining is that it can be 
convenient to allow for a sort of "branching flow" where depending on state, 
the action result could chain/flow from one action to another directly (without 
having to make a round-trip back to the user's browser).

I don't think any of the alternatives can achieve an equivalent result without 
an additional round-trip to the browser.  Although it's probably not as 
prevalent now as it was years ago, there are still scenarios where limited 
bandwidth and propagation delays can make each individual user request 
"expensive" in terms of round-trip time.  The action chaining feature can 
(sometimes) help avoid some of those additional round-trips.

If action chaining support will be removed in a future Struts 2 release, 
applications that currently depend on it will need some time to restructure 
their design/implementation to compensate.

Regards,

     James.

On 2026-10-25 16:07 UTC Lukasz Lenart wrote:
> Hi,
> 
> We are considering deprecating action chaining and removing it in a
> future major release. This covers the "chain" result type
> (org.apache.struts2.result.ActionChainResult), the "chain" interceptor
> (org.apache.struts2.interceptor.ChainingInterceptor) that copies the
> previous action's properties onto the next one, and the Unchainable
> marker interface.
> 
> Action chaining has been documented as "not recommended" for a long
> time. It runs a second action inside the first request with its own
> interceptor stack, shares the value stack between the two actions, and
> copies action properties by name, which makes the flow of data between
> them hard to follow and hard to secure. The alternatives cover the usual
> cases:
> - the "redirectAction" result (Redirect After Post), which sends the
> browser to the next action and keeps each request to one action
> - moving the shared logic into a service or a base class that both
> actions call directly
> - ScopedModelDriven or the session, where state has to survive between
> the two steps
> 
> One thing to check if you use the Convention plugin: it chains
> implicitly. When an action "foo" returns a result code "bar" and no
> result is configured for it, and an action named "foo-bar" exists in the
> same package, the plugin builds a chain result to it. You may be relying
> on chaining without a <result type="chain"> anywhere in your
> configuration.
> 
> Before we decide, we would like to know whether anyone still relies on
> action chaining. If you use it, please reply and tell us what you use it
> for, especially if the alternatives above would not work for you.
> 
> Thanks in advance!
> Lukasz
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to