Gregg Leichtman ha scritto:
Sorry, I'm still confused as to how my original approach is different
from Mr. Starr's. As far as I can see, he seems to be inserting tiles in his /tiles/layouts/classicLayout _directly_ from the "puts" for title
and body, not from an extended definition wrapped around either the
title or body. Is his approach correct because he is inserting from
"puts" that are defined within an extended definition?

No, it has nothing to do with extended definitions.
Again, your "index.jsp" pages says:

*snip*

<jsp:forward page="/tiles/layouts/siteLayout.faces"/>

*snap*

I suppose that siteLayout.faces points to siteLayout.jsp, right?
Ok, as far as I can see, your siteLayout.jsp is a layout page. A layout page is made of NOT FILLED attributes. You can fill them through the use of definitions, as you did in:

*snip*

   <definition name="/mainLayout" path="/tiles/layouts/siteLayout.jsp">
       <put name="htmlHeader" type="template"
value="/tiles/htmlHeaderTile.jsp"/>
       <put name="header" type="template" value="/tiles/headerTile.jsp"/>
       <put name="rightSideBar" type="template"
value="/tiles/rightSideBarTile.jsp"/>
       <put name="footer" type="template" value="/tiles/footerTile.jsp"/>
   </definition>

   <definition name="/welcomePage" extends="/mainLayout">
       <put name="content" type="template" value="/tiles/homeTile.jsp"/>
   </definition>

*snap*

But you forward to "siteLayout.faces" (that forwards to "siteLayout.jsp") that is used by "/mainLayout" definition. Instead you need to "forward" to the definition itself, not its layout page!
Therefore, prepare a JSP page containing:
<tiles:insert name="/mainLayout" />

HTH
Antonio

P.S.: I committed some code that corrects some misleading exception messages. Anyway to check it, you should download the source code from SVN.

Reply via email to