my dog learned polymorphism
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 Make it so: Java DB Connections & Transactions this week in the JDBC 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.
I agree. Here's the link:
subject: Tiles doesn't render one of includes
It's not a secret anymore!