Merci.
I will have a look at it.
For my problem, I use . . . heuuuuuh, Tomcat 3.2.1 :(
I just tried with Catalina 4.0b1 and . . . wow, it works fine :)
Does I need a special parameter in server.xml, something else ???
Vincent
-----Message d'origine-----
De : Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
Envoye : mercredi 28 mars 2001 11:06
A : [EMAIL PROTECTED]
Objet : Re: Template -struts-template and generated HTML / templating
using PUSH model
Hi Vincent,
Have a look to Components proposal. Components proposal can be seen as
"extended templates". With Components you can define your template's
contents/attributes in a separate file, and insert content by using its
name. A
content, named a component, can also inherit from other definitions.
Components
proposal also contains other features.
See (main site) http://www.lifl.fr/~dumoulin/components
(mirror) http://www.geocities.com/cedricdumoulin/components/
I am currently working on the possibility to define or modify the
template/component inside the action or inside the jsp. This will be
available
soon (see a previous mail 'Re: PROPOSAL: Template Screens').
Furthermore, useful Components features will be progressively introduce in
Struts version 1.1
For your first question, see intermixed.
Cedric
Vincent Harcq wrote:
> 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 ?
>
What jsp server do you use ? This happens because your server doesn't
flush
included page.
You can try to use the components library instead of template one, it is
fully
compatible.
>
> 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
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com