You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kalra, Ashwani" <as...@cgey.com> on 2003/10/30 06:27:30 UTC

tiles question

hi,
I tiles you have to maintain two pages. One that includes all the sections
like header, footer, variable content jsp, etc. and one jsp which contains
your code(varible part).
This doubles up the no of jsps ?  Is it ok. any work around ?

TIA
Ashwani Kalra
http://www.geocities.com/ashwani_kalra








____________________________________________________
This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

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


Re: tiles question

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
On 10/30/2003 09:00 AM Frers Michael wrote:
> Hi
> well this is ok
> 
> tiles is used to manage many jsp sides with all nearly the same layouts over
> one configuration file
> 
> this means you have to maintain (if you use full tiles power) minimum 3
> files:
> the layout jsp (setting positions of header, body, footer, and so on)
> the content files (foreach (header,body,footer,and so on){ you have to make
> jsp sides;})
> 
> the configuration xml file ( setting which content file should be used at
> which position in layout file)
> 
> the advantage is that if all websites have the same header and footer you
> only have to create the footer and header jsp once

The saving in the number of pages comes when you have many pages. Take 
as an example a page with 3 parts. That means for your first page, you 
have to create 5 files:

tiles-def.xml (config)
layout.jsp (skeleton)
header.jsp
content.jsp
footer.jsp

Now you want another page. Assuming that your header and footer require 
only changes that you can take care of in the xml, then you only require 
one more file - the content.jsp for the new page. So for a 10 page 
website, you only need 10 content pages, plus 4 (xml, layout, header & 
footer).

I don't think I could live without it now.

Adam
-- 
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9


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


Re: tiles question

Posted by Frers Michael <fr...@Sisis.de>.
Hi
well this is ok

tiles is used to manage many jsp sides with all nearly the same layouts over
one configuration file

this means you have to maintain (if you use full tiles power) minimum 3
files:
the layout jsp (setting positions of header, body, footer, and so on)
the content files (foreach (header,body,footer,and so on){ you have to make
jsp sides;})

the configuration xml file ( setting which content file should be used at
which position in layout file)

the advantage is that if all websites have the same header and footer you
only have to create the footer and header jsp once





----- Original Message -----
From: "Kalra, Ashwani" <as...@cgey.com>
To: "Struts (E-mail)" <st...@jakarta.apache.org>
Sent: Thursday, October 30, 2003 6:27 AM
Subject: tiles question


> hi,
> I tiles you have to maintain two pages. One that includes all the sections
> like header, footer, variable content jsp, etc. and one jsp which contains
> your code(varible part).
> This doubles up the no of jsps ?  Is it ok. any work around ?
>
> TIA
> Ashwani Kalra
> http://www.geocities.com/ashwani_kalra
>
>
>
>
>
>
>
>
> ____________________________________________________
> This message contains information that may be privileged or confidential
and
> is the property of the Cap Gemini Ernst & Young Group. It is intended only
> for the person to whom it is addressed. If you are not the intended
> recipient, you are not authorised to read, print, retain, copy,
disseminate,
> distribute, or use this message or any part thereof. If you receive this
> message in error, please notify the sender immediately and delete all
copies
> of this message.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


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


Re: tiles question

Posted by "Ruth, Brice" <br...@fiskars.com>.
There's a method of reducing this duplication in Ted Husted's "Struts in 
Action" book - the method, I believe, is called the "body wrap" method 
and it addresses a particular situation that is common, that allows you 
to eliminate this duplication. Also, you can define and extend tile 
definitions in XML, that also help mitigate and leverage the 
scaleability of Tiles.

I recommend you check out Ted's book or other Struts books that also 
address Tiles.

Kalra, Ashwani wrote:

>hi,
>I tiles you have to maintain two pages. One that includes all the sections
>like header, footer, variable content jsp, etc. and one jsp which contains
>your code(varible part).
>This doubles up the no of jsps ?  Is it ok. any work around ?
>
>TIA
>Ashwani Kalra
>http://www.geocities.com/ashwani_kalra
>
>
>
>
>
>
>
>
>____________________________________________________
>This message contains information that may be privileged or confidential and
>is the property of the Cap Gemini Ernst & Young Group. It is intended only
>for the person to whom it is addressed. If you are not the intended
>recipient, you are not authorised to read, print, retain, copy, disseminate,
>distribute, or use this message or any part thereof. If you receive this
>message in error, please notify the sender immediately and delete all copies
>of this message.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>  
>

-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



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