| The TemplateHandler reads a template file from
the document root, based on the URL, and passes the content through
one or more template filters.
The following configuration parameters are used to initialize this
Handler :
-
prefix
- Only URLs beginning with this string will be candidates for
template processing. The default is "/".
-
suffix
- Suffix string for our requests.
-
templates
- A list of
Template class names.
Methods in the template classes will
be invoked to process the XML (or HTML) tags present in the content.
-
session
- The name of the request property that the Session ID will be found
in, used to identify the proper template instance.
The default value is "SessionID". Typically, a sessionHandler,
such as
sunlabs.brazil.handler.CookieSessionHandler is used
upstream to create the sessionID. If no id is found, then the
session named "common" is used instead. Exactly one instance of
each template class is created for each session.
-
default
- The default file in the directory to use as a template if
a directory name is specified. Defaults to index[suffix],
or "index.html" if no suffix is provided.
The request properties DirectoryName and
FileName may be set as a convinience for downstream handlers.
To filter content other than from the file system, use the
sunlabs.brazil.filter.TemplateFilter template filter instead.
author: Stephen Uhler (stephen.uhler@sun.com) author: Colin Stevens (colin.stevens@sun.com) version: 1.32 00/12/11 |