struts / tiles put not visible inside tile

R

Rob D

Hi,

I am working with struts and tiles.

In a certain page I have a tile inside a tile with the following line ...

<tiles:getAsString ignore="true" name="abba" />

inside tiles-defs.xml, inside the definition for this page I have ...

<put name="abba" type="string" value="hello" />

At least in theory, I should see hello print where I have getAsString,
right?

OK, now suppose I copy the put into the tile that has the getAsString, on
the line before. This causes the JSP to appear badly deformed. Any ideas why
adding this put would do anything more than cause the getAsString to print
hello?

Thanks for your help.
 
B

Brock Heinz

Rob D said:
Hi,

I am working with struts and tiles.

In a certain page I have a tile inside a tile with the following line ...

<tiles:getAsString ignore="true" name="abba" />

inside tiles-defs.xml, inside the definition for this page I have ...

<put name="abba" type="string" value="hello" />

At least in theory, I should see hello print where I have getAsString,
right?

Yes - this is commonly used with the html <title/> tag.

Without knowing more about your action mapping it's impossible to know
fully what your problem is.
OK, now suppose I copy the put into the tile that has the getAsString, on
the line before. This causes the JSP to appear badly deformed. Any ideas why
adding this put would do anything more than cause the getAsString to print
hello?

The syntax for the <tiles:put/> tag is different than the syntax in
the tiles-defs.xml.

Here is an example of both

tiles-defs.xml - <put name="title" value="Sample Page Title" />
jsp - <tiles:put/> (assuming your taglib mapping sets the prefix to
'tiles')

Brock
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top