Hi, Thanks to everyone who replied, both here and off-list. It is clear that action chaining is still in use, so it won't simply be removed.
James, your point about server-side branching was the key one. You are right that none of the alternatives I listed can move from one action to another without an extra round-trip to the browser. So instead of a plain deprecation, the plan is to add a replacement that keeps exactly that and drops the rest. The idea is a new "forward" result: - it runs the next action inside the same request, like chaining does today, and the next action renders its own result - the target is a fixed action name from the configuration; branching is done with result codes, one forward result per branch - an action can only be forwarded to if it opts in, with an annotation on the class or an attribute on <action> - the target gets its own value stack, so the previous action is not visible to it - request parameters are bound again on the target, like a servlet forward, under the target's own @StrutsParameter rules - there is no automatic property copying; the forward result lists the values it passes, the target marks the properties that accept them, and only values named on both sides get through - the Convention plugin's implicit "foo" -> "foo-bar" chaining becomes an implicit forward, but only to targets that opted in The details are in the ticket: https://issues.apache.org/jira/browse/WW-5849 The rough timeline: - Struts 7.6.0: the forward result is added; chaining keeps working exactly as it does now - Struts 7.7.0: chaining is marked as deprecated, and it will be able to log which properties each chain actually copies, so you can see what to pass explicitly when migrating - Struts 8.0.0: chaining is removed Migrating a chain means opting in the target action and listing the values to pass. Many chains may need nothing passed at all, because request parameters arrive on the target anyway. Nothing is set in stone yet, so any feedback is welcome, here or on the ticket, especially if you have a chaining use case this would not cover. Cheers Łukasz On Sat, Nov 07, 2026 10:42 PM, James Chaplin via user < [email protected]> wrote: > 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] > >

