Correction: Typo error in my example definition: My example definition did not include slashes. I have used slashes because navigation rules required them (although I seem to remember a post saying that restriction has been removed - but I havn't tested this) My example definition should be:
<definition name="/systemLogon" extends"/siteMainLayout"/> <put name="body" type="template" value="/ ... some jsp containing only JSF components with no reference to Tiles"/> </definition> -----Original Message----- From: Dick Starr Sent: Wednesday, October 11, 2006 8:42 AM To: [email protected] Subject: RE: Tiles Failure in GlassFish: org.apache.tiles.NoSuchDefinitionException I never did like the fact that my index.jsp couldn't just reference a tile, but it was the only way I could make it work (all my other jsp's could reference tiles). However, I have continued to upgrade to the latest releases in the hopes of improving things, and I am now running the 10/4/06 release of Shale. My index.jsp now says <jsp:forward page="systemLogon.faces"/> where "systemLogon.faces" is a tile def as follows: <definition name="systemLogon" extends"siteMainLayout"/> <put name="body" type="template" value=" ... some jsp containing only JSF components with no reference to Tiles"/> </definition> Dick -----Original Message----- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 11, 2006 6:50 AM To: [email protected] Subject: Re: Tiles Failure in GlassFish: org.apache.tiles.NoSuchDefinitionException 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.
