You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Darren James <jd...@netflix.com> on 2008/05/09 21:36:16 UTC
problems nesting TileResults....
Hello All,
I have a flow that is basically a toplevel struts2 action having a
result of type TilesResult. That tile
result has as one if it's attributes another struts2 action that also
has a result of type TilesResult.
So my tiles.xml looks like this (I've changed names and attributes to
try to simplify the example
as much as possible)
<definition name="pageLevelTile" extends="somePageLevelTemplate">
<put-attribute name="header"
value="/WEB-INF/tiles/pages/header.jsp" />
<put-attribute name="body" value="/findTileBody.action" />
</definition>
<definition name="moduleLevelTile" extends="someModuleTemplate">
.... stuff
</definition>
-----------
So i have an action, call it showPage.action that forwards to
pageLevelTile, then
within pageLevelTile the "body" attribute invokes the action
findTileBody.action
that eventually forwards to the moduleLevelTile.
The issue with this is the browser only renders the moduleLevelTile (all
the
surrounding page-level stuff gets wiped out for some reason), and I'm
seeing this
exception:
---------------------
SEVERE: Servlet.service() for servlet default threw exception
java.io.IOException: Error including path
'/WEB-INF/tiles/templates/yuiDocTemplate.jsp'.
java.lang.IllegalStateException: Exception occurred when flushing data
at
org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:201)
at
org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:185)
at
org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
at
org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:86)
at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)
at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:368)
at
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:104)
at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
---------------------
Any ideas?
thanks much,
- darren.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: problems nesting TileResults....
Posted by Darren James <jd...@netflix.com>.
Hi Antonio,
I got a 2.0.6 snapshot and the issue is fixed! Thanks much for the
tip. Also noteworthy is that
now that I have actions that can forward to tiles which have nested
within them actions that also
forward to tiles (whew), in order for action context to be available to
JSP pages I had to follow
the steps to include the struts-cleanup filter in web.xml. The docs on
the struts2 site say that this
filter is solely for the purpose of sitemesh integration, but apparently
it's beneficial to tiles
integration as well....
thanks again,
- Darren.
Antonio Petrelli wrote:
> 2008/5/13 Darren James <jd...@netflix.com>:
>
>> i downloaded the 2.0.5 version of tiles, and i see the same issue....
>> seems to be a pretty severe limitation of tiles....
>>
>
> It's not a limitation, it's a bug :-)
> https://issues.apache.org/struts/browse/TILES-232
>
> Try using the SVN version of Tiles (branch: TILES_2_0_X):
> http://svn.apache.org/repos/asf/tiles/framework/branches/TILES_2_0_X/
> Or you can use the 2.0.6 snapshots:
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/tiles/
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: problems nesting TileResults....
Posted by Antonio Petrelli <an...@gmail.com>.
2008/5/13 Darren James <jd...@netflix.com>:
> i downloaded the 2.0.5 version of tiles, and i see the same issue....
> seems to be a pretty severe limitation of tiles....
It's not a limitation, it's a bug :-)
https://issues.apache.org/struts/browse/TILES-232
Try using the SVN version of Tiles (branch: TILES_2_0_X):
http://svn.apache.org/repos/asf/tiles/framework/branches/TILES_2_0_X/
Or you can use the 2.0.6 snapshots:
http://people.apache.org/repo/m2-snapshot-repository/org/apache/tiles/
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: problems nesting TileResults....
Posted by Darren James <jd...@netflix.com>.
i downloaded the 2.0.5 version of tiles, and i see the same issue....
seems to be a pretty severe limitation of tiles....
- darren.
Antonio Petrelli wrote:
> 2008/5/12 Darren James <jd...@netflix.com>:
>
>> struts 2.0.11, and the tiles bundled with that version, which is tiles 2.0.4
>>
>
> Please try updating to Tiles 2.0.5:
> http://tiles.apache.org/download.html
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: problems nesting TileResults....
Posted by Antonio Petrelli <an...@gmail.com>.
2008/5/12 Darren James <jd...@netflix.com>:
> struts 2.0.11, and the tiles bundled with that version, which is tiles 2.0.4
Please try updating to Tiles 2.0.5:
http://tiles.apache.org/download.html
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: problems nesting TileResults....
Posted by Darren James <jd...@netflix.com>.
sorry....
struts 2.0.11, and the tiles bundled with that version, which is tiles 2.0.4
thx,
- darren
Antonio Petrelli wrote:
> Version of Struts and Tiles?
>
> Antonio
>
> 2008/5/9 Darren James <jd...@netflix.com>:
>
>> Hello All,
>>
>> I have a flow that is basically a toplevel struts2 action having a result of
>> type TilesResult. That tile
>> result has as one if it's attributes another struts2 action that also has a
>> result of type TilesResult.
>> So my tiles.xml looks like this (I've changed names and attributes to try to
>> simplify the example
>> as much as possible)
>>
>> <definition name="pageLevelTile" extends="somePageLevelTemplate">
>> <put-attribute name="header" value="/WEB-INF/tiles/pages/header.jsp"
>> />
>> <put-attribute name="body" value="/findTileBody.action" />
>> </definition>
>>
>>
>> <definition name="moduleLevelTile" extends="someModuleTemplate">
>> .... stuff
>> </definition>
>>
>> -----------
>>
>> So i have an action, call it showPage.action that forwards to pageLevelTile,
>> then
>> within pageLevelTile the "body" attribute invokes the action
>> findTileBody.action
>> that eventually forwards to the moduleLevelTile.
>>
>> The issue with this is the browser only renders the moduleLevelTile (all the
>> surrounding page-level stuff gets wiped out for some reason), and I'm seeing
>> this
>> exception:
>>
>> ---------------------
>> SEVERE: Servlet.service() for servlet default threw exception
>> java.io.IOException: Error including path
>> '/WEB-INF/tiles/templates/yuiDocTemplate.jsp'.
>> java.lang.IllegalStateException: Exception occurred when flushing data
>> at
>> org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:201)
>> at
>> org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:185)
>> at
>> org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
>> at
>> org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:86)
>> at
>> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)
>> at
>> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:368)
>> at
>> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:104)
>> at
>> org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
>> at
>> org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
>> ---------------------
>>
>> Any ideas?
>>
>> thanks much,
>>
>> - darren.
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: problems nesting TileResults....
Posted by Antonio Petrelli <an...@gmail.com>.
Version of Struts and Tiles?
Antonio
2008/5/9 Darren James <jd...@netflix.com>:
> Hello All,
>
> I have a flow that is basically a toplevel struts2 action having a result of
> type TilesResult. That tile
> result has as one if it's attributes another struts2 action that also has a
> result of type TilesResult.
> So my tiles.xml looks like this (I've changed names and attributes to try to
> simplify the example
> as much as possible)
>
> <definition name="pageLevelTile" extends="somePageLevelTemplate">
> <put-attribute name="header" value="/WEB-INF/tiles/pages/header.jsp"
> />
> <put-attribute name="body" value="/findTileBody.action" />
> </definition>
>
>
> <definition name="moduleLevelTile" extends="someModuleTemplate">
> .... stuff
> </definition>
>
> -----------
>
> So i have an action, call it showPage.action that forwards to pageLevelTile,
> then
> within pageLevelTile the "body" attribute invokes the action
> findTileBody.action
> that eventually forwards to the moduleLevelTile.
>
> The issue with this is the browser only renders the moduleLevelTile (all the
> surrounding page-level stuff gets wiped out for some reason), and I'm seeing
> this
> exception:
>
> ---------------------
> SEVERE: Servlet.service() for servlet default threw exception
> java.io.IOException: Error including path
> '/WEB-INF/tiles/templates/yuiDocTemplate.jsp'.
> java.lang.IllegalStateException: Exception occurred when flushing data
> at
> org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:201)
> at
> org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:185)
> at
> org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
> at
> org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:86)
> at
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)
> at
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:368)
> at
> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:104)
> at
> org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
> at
> org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
> at
> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> ---------------------
>
> Any ideas?
>
> thanks much,
>
> - darren.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org