Hi Warren,

  In the Struts Template example, you define one template
(chapterTemplate.jsp) common to all your web pages.
  Then, you define one jsp file for each of your web page that use the
template (introduction.jsp, optional.jsp, ...). In each jsp file you specify
template argument values (header, body, ...). If you want web pages with
common part (ex : sidebar), define another template fixing this property
value. This template could possibly use the more general template.

  You can also have a look to my Component proposal
(http://gauss.ficsgrp.com/cdm). This can be seem as an extended template
library. It provides all Struts Template functionalities (with same syntax),
plus new useful functionalities to develop reusable 'web components'.
  I have rewrite the struts-template example using the Components. Chek it !
  Any comments are welcome to improve this Component library.

  Cedric

Warren Strange wrote:

> Hi,
>
> I am just get started with struts, and have a question on templates.
>
> >From the example given (templates-example) , it appears that you need  a
> template file
> for each content JSP that you want to lay out using the template. For
> example:
>
> introduction.html  (the content), and introduction.jsp (the template
> reference)
>
> optional.html (the content)  and optional.jsp (the template reference)
>
> and so on....
>
> This approach seems rather cumbersome to me. If you want to change the
> template
> you might have go back and edit all the template reference files (e.g. say
> you add
> 'rightSideBar'  content, or something like that).
>
> I want to define one common template (which includes standard headers,
> footer,
> etc. - possibly changing their behavior dynamically) and have it applied
> automatically
>  to all my content.
>
> How is done?
>
> Thanks
>
> Warren

Reply via email to