Resolution: Not A Problem
Affects Version/s: 2.0.11
Fix Version/s: None
Component/s: Plugin - Tiles
struts 2.0.11 w/ tiles plugin, tiles-2.0.6-SNAPSHOT (same problem with 2.0.4 and 2.0.5), java 1.6.0_03, tomcat 6.0.16 and servlet api 2.5.
I have a struts action which returns a tile as a result. This tile has an attribute which points to another tile, which uses another action as template:
<definition name="layout" template="layout.jsp" >
<put-attribute name="menu" value="menu" />
<definition name="menu" template="/menu.action" />
layout.jsp contains the line:
<tiles:insertAttribute name="menu" />
As soon as this line is there, ServletActionContext.getRequest() returns null in my taglib which is called from layout.jsp after that line. Without that line, it works fine.
I posted this issue to the tiles user list and was finally asked to file an issue here. You may want to read the full post here:
Simple example which reproduces the problem: http://baldes.name/s2t2.tar.gz This is a packed eclipse wtp "dynamic web project" containing all needed libraries and files (~5mb) (that is, all but apache tomcat itself).
Calling http://server/context/some.action yields the problem I described.
This is the stacktrace I get: http://baldes.name/s2t2.stacktrace.txt