Tiles <add> tag calling another Tile definition

Hi all,

I wonder if you could help me.

I have the following code in my tiles-defs.xml (This is only a fraction of the complete code in the tiles-defs. It's the part I'm having trouble with.)

-

<!-- begin /profile/user/content.html -->

<definition name=".view.profile.user.content" extends="twocolumn.layout">

<putList name="column2">

<add value=".view.profile.content.menu"/>

</putList>

</definition>

<definition name=".view.profile.content.menu" extends="menu.layout">

<putList name="menu_modules">

<add value="/common/modules/content_other_person.jsp"/>

<add value="/common/modules/content_comments.jsp"/>

<add value="/common/modules/content_other_interests.jsp"/>

</putList>

</definition>

<!-- end /profile/user/content.html -->

-

The "column2" putList includes the ".view.profile.content.menu" via the standard <add value"" /> tag. I can't seem to get Tiles to process the ".view.profile.content.menu" definition though. For some reason it's not processing that definition and instead just sending the string ".view.profile.content.menu" out to my JSP.

Here is my JSP syntax (using JSTL):

-

<c:if test="${column2 != null}">

<div id="column2">

<c:forEach items="${column2}" var="column2">

<c:import url="${column2}" />

</c:forEach>

</div>

</c:if>

-

The error I see printed out to my JSP is the following "The requested resource (/layouts/.view.profile.content.menu) is not available". This error appears to be happening because the literal string ".view.profile.content.menu" is being sent down to the JSP instead of being processed by Tiles.

What I ultimately wanted in the page was for the three .jsp file paths located in my "menu_modules" putList to be included on the page.

Can anyone tell me what I'm doing wrong here? Any help you can provide is much appreciated!

Thanks!

-- Dave

[2586 byte] By [dkerstinga] at [2007-11-26 14:38:16]
# 1

Hi, Dave

Here is your code

<c:forEach items="${column2}" var="column2">

<c:import url="${column2}" />

</c:forEach>

Did you try to do something like:

<c:forEach items="${column2}" var="MYcolumn2">

<c:import url="${MYcolumn2}" />

</c:forEach>

i

akulikova at 2007-7-8 8:19:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...