struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff_Mycha...@nlgroup.ca
Subject Re: How to use Templates efficently ?
Date Tue, 29 Oct 2002 13:57:33 GMT

I found this helpful as well

Sample chapter on tiles  from Ted's up coming book

http://www.manning.com/getpage.html?project=husted&filename=chapters.html





Marcus Biel <Marcus.Biel@bmw.de> on 10/29/2002 05:11:26 AM

Please respond to "Struts Users Mailing List"
       <struts-user@jakarta.apache.org>

To:    struts-user@jakarta.apache.org
cc:

Subject:    How to use Templates efficently ?


Sorry this might be a dumb question,
but I can't really figure out how to use struts templates efficently.

I already had a look at Struts-Docu:
http://localhost:8080/struts-documentation/api/org/apache/struts/taglib/template/package-summary.html#package_description


If i figured it out correctly,

You got for example

a header file
a content file
a footer file
a "template file":
<tr><td><template:get name='header'/></td></tr>
<tr><td><template:get name='content'/></td></tr>
 <tr><td><template:get name='footer'/></td></tr>

a jsp that uses those templates:
<template:put name='title' content='Templates' direct='true'/>
<template:put name='header' content='/header.html' />
<template:put name='sidebar' content='/sidebar.jsp' />
<template:put name='content' content='/introduction.html'/>
<template:put name='footer' content='/footer.html' />

Asuming I would have 100 different jsp content files,
I would have:
1 header file
1 footer file
1 template file
100 content files
100 jsp files that are "using" the other files.

so I would have 203 files instead of 100 !!!

For this example: wouldn't it make more sense,
to have one "introduction.jsp" file, and at the begining you insert your
header file,
at the end you insert your footer file.
1 header file
1 footer file
100 Content files.
102 Files (not 203!)

Am I correct ? Is this possible ?

thx,
marcus

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








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


Mime
View raw message