Hi,
1. I am beginning to look at Templating mechanism and so use the example
struts-template using version pre-beta-2 (23/03/01).
The result is a strange for me. Can somebody explain me this.
On the first page, when I look at the generated code (look at the end of
message), I got something where the side-bar.jsp and header.jsp is included
BEFORE the <html> tag; while from what I see in chapterTemplate.jsp, the
<html> should appear first.
Is there a problem somewhere ? Does somebody is aware of that ? Is it my
browser ?
2. I was also thinking about another mean of doing templating. The fact
that I have two create each 2 files (introduction.jsp and introduction.html)
is not really needed if you consider you have a little number of different
templates to work with.
Say you have only two templates (side-bar header content footer) (left-bar
header content right-bar footer), it is too much for me to create each time
the page that will use template:put.
I have done that before I used Struts in a "request processor" by setting
the value of a "content" field, forwarding to one of two pages template1.jsp
and template2.jsp that uses jsp include tags.
My plan was to do that in the findForward() method of ActionForwards and
forward all the time to one of the 2 template pages that I have and setting
the "content" value before.
To speak "philosophically", but wishing to not re-open this debate, the PUSH
method is for me more convenient that the "PULL" one for Page Templating
Mechanism. But I do not want to "mix" Velocity and Struts """"only""" to
solve this templating problem.
Any ideas ?
HTML generated:
---------------
<font size='5'><a name="top">Topics</a></font><p>
<table width='145'>
<tr><td><a href='introduction.jsp'>
Introduction </a></td></tr>
<tr><td><a href='using.jsp'>
Using Templates </a></td></tr>
<tr><td><a href='optional.jsp'>
Optional Content </a></td></tr>
<tr><td><a href='more.jsp'>
... and more ...</a></td></tr>
</table></p>
<table>
<tr>
<td><img src='graphics/java.gif'/></td>
<td><img src='graphics/templates.gif'/></td>
</tr>
</table><hr>
<html>
. . .
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com