tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Geary <>
Subject Proposal: Template Tags
Date Tue, 02 Oct 2001 19:30:53 GMT

About a year ago, I developed a custom tag library that implements JSP
Templates. Templates let you to build JSP pages from pluggable
components by encapsulating RequestDispatcher includes in custom tags. I
wrote an article about that tag library for JavaWorld, which you can
read at:

I contributed the templates tag library to the Apache Struts JSP
framework. Subsequently, I received a great deal of feedback from
JavaWorld readers and Struts users concerning that library, and I
incorporated that feedback into a second-generation template tag library
that I rewrote from scratch.

The second-generation tag library implements the Composite and Strategy
design patterns, which results in some features that were not present in
the original library, such as creating new templates that "inherit" from
an existing template. You can read about that tag library at:


I would like to contribute the 2nd generation templates tag libary to
Jakarta Taglibs. I doubt that I can update the Struts tag library,
because the syntax of the tags in the 2nd generation library is
different than the original, which would break many existing struts
applications. Therefore, I would like to contribute the library to
Jakarta Taglibs. (Note: the 2nd generation taglib can coexist peacefully
with the original library in Struts, so Struts users could choose
between the two).


As you can see from, there
are many benefits to the templates tag library. With the templates tag
library, you can create modular JSP pages from pluggable components, in
much the same way that you can build GUI applications with the AWT and

Templates can have optional and role-based content, and you can nest
templates within other templates anyway you see fit. Templates can be
defined somewhere other than where they are used, which allows template
definitions to be grouped in a single file, simplifying their
maintenance. Templates can "inherit" their definitions from existing
templates, which makes them easier to create and understand.

This 2nd generation template library is a solid implementation that has
been subjected to public scrutiny, and has been refactored a number of
times to eliminate bugs and add features. I think it would make a great
addition to Jakarta Taglibs.

david geary

View raw message