tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <antonio.petre...@gmail.com>
Subject Re: Tiles2 / Strus2 using an action's output as template
Date Tue, 12 Feb 2008 11:40:51 GMT
2008/2/12, Daniel Baldes <db@open.ch>:
>     <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

Mime
View raw message