Here is an open issue in struts2 tiles plugin:
https://issues.apache.org/struts/browse/WW-2762

that is a critical issue for me. I would like to help resolve this issue, but am not sure about the root cause.

Here is the issue in summary:

If you create a tile definition whose JSP page contains a struts2 <s:form>, and if that tile page inserts a subtile page that contains form controls, then the page will not render and a NullPointerException will be thrown from the org.apache.struts2.views.util.UrlHelper class. Attached to the JIRA is a very small sample that illustrates this issue.

I have run this in the debugger and have found that this line of code throwing the NPE:

UrlHelper.java:85

// FIXME: temporary hack until class is made a properly injected bean
       Container cont = ActionContext.getContext().getContainer();

The xwork2.ActionContext.getContext() is returning null.

I have also found that in the reproducible test case, that this function is called twice, once per thread. The first time that it is called ActionContext.getContext() returns a valid context object and everything is fine. But in the second invocation, getContext() returns null.

The actionContext is a ThreadLocal. So somehow the ActionContext's internal actionContext is null for one of these two threads. I'm not sure why or what exactly each of these two threads are responsible for.

Any suggestions for correcting this would be appreciated.

Thanks,
John





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to