You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Friedman <hu...@ix.netcom.com> on 2004/06/09 02:49:07 UTC

RE: Tiles: Use layout definitions from config within jsp? (Corrected + Working Answer)

Matt,

Yes, I had the syntax wrong:

<%@ taglib uri="struts-tiles" prefix="tiles" %>
<tiles:insert definition="DefinitionFromTilesXMLFile" />

You can also override pieces using "tiles:put" statements
in your JSP.  This works (just tested it on Struts v1.1 + Tomcat).

I found the correct syntax in the User and Developer Guides -> "Tiles
Tags" -> "Tiles Taglib Syntax Reference".

Regards,
David

-----Original Message-----
From: Kruse, Matt [mailto:MKruse@aquent.com]
Sent: Tuesday, June 08, 2004 8:16 AM
To: Struts Users Mailing List
Subject: RE: Tiles: Use layout definitions from config within jsp?


> You should read section 4.1.1 of the
> Tiles Advanced Features (link at bottom
> of the page of the struts site, section
> on the Tiles User Guide) which gives
> examples like so:
> <tiles:definition id="definitionName" page="/layouts/myLayout.jsp" >
> <tiles:put name="title" value="Page Title" />
> ...

How does that help?
I know how to build definitions from within JSP pages, but that's not what
I'm asking.
I'm asking how to use a definition that is _already defined_ in the
tiles-defs.xml file from within the JSP page, so I don't have to hard-code
the layout filename or definition with my JSP pages.

Matt Kruse



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org