This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Tiles doesn't render one of includes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles doesn Watch "Tiles doesn New topic

Tiles doesn't render one of includes


Joined: Aug 31, 2004
Posts: 7
Hi all.
I've got very strange problem in Tiles. All worked fine until I added one more page into definition. I added "contextMenu" line.

Here are my view definitions:
<definition name="template" page="/WEB-INF/jsp/template.jsp">
<put name="body" value="/WEB-INF/jsp/empty.jsp" type="page"/>
<put name="mainMenuIndex" value="0"/>
<put name="userMenuIndex" value="0"/>
<put name="contextMenu" value="/WEB-INF/empty.jsp" type="page"/>
<put name="contextMenuIndex" value="0"/>
<put name="script" value=""/>
<put name="onLoadScript" value=""/>

<definition name="feeds.list" extends="template">
<put name="pageTitleKey" value="pages.feeds.list.title"/>
<put name="body" value="/WEB-INF/jsp/feeds/feeds.jsp" type="page"/>
<put name="contextMenu" value="/WEB-INF/jsp/feeds/contexMenu.jsp" type="page"/>
<put name="userMenuIndex" value="2"/>
<put name="contextMenuIndex" value="0"/>

Here is template.jsp:
<div id="side-bar">
<jsp:include page="userMenu.jsp"/>
<tiles:insert name="contextMenu"/>

All other pages work fine. They display empty.jsp at proper place. But when "feeds.list" view renders, Tiles display nothing instead of "contextMenu.jsp".
If i put source of "contextMenu.jsp" into "template.jsp" - all works fine, but if I try to use <tiles:insert>, nothing displays.

Please, show me my mistake. Thanks.
Don't get me started about those stupid light bulbs.
subject: Tiles doesn't render one of includes