It the example below, "background" is available *only* in the test.jsp file. If I try to use <tiles:useAttribute> in any other jsp file in that particular tiles-definition, I get an exception saying that "background" isn't in any context. Setting various context in the definition had no effect. I got around this by using the <tiles:useAttribute> in the test.jsp file and then setting a session attribute that was then visible by the rest of the files.
-----Original Message----- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 7:48 AM To: Struts Users Mailing List Subject: Re: Using Tiles tags as values for Struts and HTML Hi, For me, it should work. Is there any exception ? What is the resulting html source code ? Also, you can try following in your "/templates/test.jsp" if you have some trouble with quotes : <tiles:useAttribute name="background" /> <BODY background="<%=background%>" > Cedric "Robert D. Morse" wrote: > I have a Tiles definition that looks something like this: > > <tiles-definition> > <definition name="test.definition" path=/templates/test.jsp"> > ...a series of <put>'s.... > <put name="background" value="/images/test.gif"/> > </definition> > </tiles-definition> > > Now, I want to use the value of "background" as the value for something like > the background=" " in the HTML Body tag. In other words: > > <BODY background=<tiles:getAsString name="background"/> > > > This doesn't work. > I've tried enclosing in quotes, escaped quote, apostrophe, and I can't seem > to make it work. Any suggestions? > > If you haven't tried Tiles with Struts, you're really missing out. > > ------------------------------------------- > Robert D. Morse > [EMAIL PROTECTED] > PGP Key: D9C4AA6A > PGP Finger Print: ED56 DEEA 95CF AC99 C2B0 77D4 7D92 ACCA D9C4 AA6A > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>