struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
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

Marcus Biel <> on 10/29/2002 05:11:26 AM

Please respond to "Struts Users Mailing List"


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:

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 ?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message