Antonio Petrelli on 31/10/06 08:07, wrote:
Rick Schumeyer ha scritto:
I have a layout that includes: <tiles:insert attribute="body"/>
My definition does *not* include "body"
The "actual" jsp page determines the proper value for "body":
<tiles:insert definition="library.default">
<tiles:put name="body" value="/pages/successBody.jsp"/>
</tiles:insert>
Question: the way I'm doing this means I now have *two *pages for
every page...in my case the "success.jsp" page that contains the
<tiles:insert> and also the "successBody.jsp" page containing the
actual content of the page.
Is this necessary, or is there a better way?
Eh, this is a good question. There is another (but not necessarily
better) way: create an extended definition for each page and then
forward directly to the definition in your Struts action. Anyway they
are still 2 objects (a definition and a JSP page) for each final page.
Probably a "better" way will be implemented in Tiles 2 (though I don't
know what it will be :-) ).
I never had to use a JSP unnecessarily purely because of tiles. I'm sure if you
could explain further, I could give you a solution to avoid superfluous JSPs.
I dont follow the description of your problem though. What do you mean by the
'actual' JSP if it's not your layout? I'm also not familiar with the use of the
<tiles:insert definition=""> tag. Don't you mean 'attribute' instead of
'definition' to use a tile def from the tiles-defs.xml?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]