You are not the first person who complains about missing container ...
I wonder if we should add a fallback though.

        if (container == null) {
            LOG.warn("Container is null, action was created manually?
Fallback to ActionContext");
            container = ActionContext.getContext().getContainer();
        }

Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2017-09-13 18:17 GMT+02:00 LAW Andy <andy....@roslin.ed.ac.uk>:
> That looks more relevant. I’ll look into it some more tomorrow morning.
>
> Thanks for your help so far.
>
>
>> On 13 Sep 2017, at 17:04, Yasser Zamani <yasser.zam...@live.com> wrote:
>>
>> Maybe you have a similar issue of [1].
>>
>> Say you have X that extends ActionSupport. Please make sure if every X
>> has been instantiated not manually (e.g. X = new X() inside your java
>> files). They should be instantiated via Strut's object factory ( e.g.
>> <action class="X").
>>
>> [1]
>> https://issues.apache.org/jira/browse/WW-4813?focusedCommentId=16085291&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16085291
>>
>> On 9/13/2017 7:31 PM, LAW Andy wrote:
>>>
>>>> On 13 Sep 2017, at 14:17, Lukasz Lenart <lukaszlen...@apache.org> wrote:
>>>>
>>>> 2017-09-13 11:02 GMT+02:00 LAW Andy <andy....@roslin.ed.ac.uk>:
>>>>> Using version 2.5.13 on Tomcat 8.0.21.
>>>>>
>>>>> I’ve attached it to this message as a text file.
>>>>
>>>> How do you fetch action in
>>>> "my.domain.controller.ActionOption.getAction(ActionOption.java:138)" ?
>>>> Do you construct those actions manually?
>>>>
>>>> at 
>>>> my.domain.controller.ActionOptionBase.getTextFromProperties(ActionOptionBase.java:122)
>>>> ~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]
>>>> at my.domain.controller.ActionOption.getAction(ActionOption.java:138)
>>>> ~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]
>>>>
>>>
>>>
>>>
>>> That function is badly named. It actually should be called getActionName();
>>>
>>> The Action contains one or more ActionOption objects. These are built in 
>>> the constructor.
>>>
>>> Later,
>>>
>>> Andy
>>>
>>>
>>>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to