2008/2/12, Daniel Baldes <[EMAIL PROTECTED]>:
> <tiles:insertAttribute name="menu" />
> ...
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> <dispatcher>REQUEST</dispatcher>
> <dispatcher>FORWARD</dispatcher>
> <dispatcher>INCLUDE</dispatcher>
> </filter-mapping>
> ...
> First question: is this the right way of doing that?
Yes.
> But then I started to use my function taglib. The tag library internally
> uses ServletActionContext.getRequest() for accessing the
> HttpServletRequest object.
>
> As soon as layout.jsp contains <tiles:insertAttribute name="menu" />,
> ServletActionContext.getRequest() returns null in my taglib
> implementation, when called from layout.jsp like this:
>
> <tiles:insertAttribute name="menu" />
>
> <c:if test="${mylib:someThing()}" >...</c:if>
>
> Without the insertAttribute call, the taglib works fine.
>
> Can you help me with this?
Since you did not provide a version of Tiles, I am assuming that you
are using Tiles 2.0.5.
There was a fix, and it will appear in Tiles 2.0.6. Try building it
from source, by downloading the trunk of Tiles.
Antonio