struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yasser Zamani <>
Subject Re: No container in actions after upgrading to 2.5.13
Date Tue, 19 Sep 2017 12:07:43 GMT

On 9/19/2017 11:43 AM, LAW Andy wrote:
>> On 14 Sep 2017, at 16:03, Yasser Zamani <> wrote:
>> Do last three exceptions occur in same time, in one action call (I think
>> because of first word of their lines 73709, 73712 and 73716 and their
>> same thread name "http-nio-8082-exec-9") ? If so, it means you want to
>> evaluate <s:property value="actionTitle", <s:property value="action" and
>> <s:property value="title" against different objects ActionOption,
>> ActionOptionBase and BasemydomainAction. I wonder how do you reach such
>> state or maybe I miss something but it's impossible while only one
>> object can be root of the OGNL.
> This is an old application, first written around 10 years ago and maintained since then.
It is possible that we have misinterpreted the intent of some of the Struts support classes
over the years, and equally it is possible that the intent of those classes has changed. I
know that the application worked up until this latest release.
> The actions are complex and consist of a series of sub-actions which are re-usable. The
top level Actions (which I’ll cal Routes) *and* the sub-actions each inherit ultimately
from ActionSupport. So, Route 1 might be a chain of sub-action A, sub-action B, sub-action
C and Route 2 might be sub-action A followed by sub-action C then sub-action D. The Route
object’s execute() function delegates in turn to the sub-actions. The Route level actions
are defined in struts.xml whereas the sub-actions are created in the constructors of the Route-level
actions. I suspect that this is why things are now breaking, but they did not do so previously.

Yes, that's the cause. Instantiating actions manually is not a good 
practice but if currently it does not make any sense in your case, I 
thought you may like my following solution:

> The application is now largely in maintenance-only mode and we have only been working
on it when security concerns arise. I don’t have the resources to commit to re-architecting
so finding security updates that break the code as a side-effect is something that causes
grief :(
> I’m pretty sure that the context-fallback should get this code working again, so I’d
be keen to get an ETA on that point release if it’s likely to happen.

Till release, I thought you may like something as below:

public class RouteLevelAction extends ActionSupport {
     public String getActionTitle() {
         SubAction b = new SubAction();
         this.container.inject(b); /* I added this under your manual 
instantiate which injects Strut's needed staff into it :) */
         return base.getTitle();

> Thanks for the work that you guys do. It is very much appreciated (even if we don’t
give that impression at times).
> Later,
> Andy

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message