Andrew Boyko wrote:

> > during this process. First off,  the web pages we will be creating will
> > have a common navigation bar used across the whole web site. It would be
> > great if we can create one HTML file called navigation.jsp which
> > all pages use.
>
> If that's the only common element on the pages, you can do that
> using the JSP include tags, pulling in the common nav bar within
> each content page.

True, but templates are so much cooler.  ;-)

> The template tags (as we've been using them, at least) support a
> somewhat different model: your content pages push their specific
> content into common templates, which place the content into regions
> of the template.  This allows you to have standard headers, footers,
> or any other common content and layout without the content pages
> needing to know or care what the standard layout is; it also allows
> you to redesign the template, potentially completely re-ordering
> the content presentation, without changing the content pages at all.

Another benefit is that templates encourage you to divide your JSP pages
into reusable components, although the same could be said of <jsp:include>.

> We've introduced the template tags to both java coders and HTML
> authors, and all found it easy to understand and like,
> and quite powerful.

Amen.

> > It seems that the struts template taglibs might be the solution,
> > unfortunately the 0.5 version of struts we downloaded does not contain
> > these taglibs.
>
> In my experience, cvs or nightly builds have been solid for
> a long while, and have been quite safe for development, not
> only for the template tags, but for the entire library.

Templates are in Struts to stay.


david


Reply via email to