| java.lang.Object sunlabs.brazil.template.Template sunlabs.brazil.template.PropsTemplate
PropsTemplate | public class PropsTemplate extends Template implements Serializable(Code) | | Template class for substituting request properties into an HTML page
This class is used by the TemplateHandler
The following request properties are used:
- query
- The query parameters are placed into the request object,
prefixed by the value assigned to "query".
- headers
- The mime headers are placed into the request object,
prefixed by the value assigned to "headers". The values:
url, query, method, and version are copied from the request
object into the properties. The clients IP address is
saved in the "address" property.
A new HTML tag,
<property> is defined. It takes the following
tag attributes:
- name
- The name of the property in
sunlabs.brazil.server.Request.props props to replace the
property tag with.
- default
- The value to use if the property is not defined.
If no
default is specified, the empty
string is used instead.
author: Stephen Uhler version: 1.0, 09/04/98 |
Field Summary | |
transient boolean | debug |
debug | transient boolean debug(Code) | | |
init | public boolean init(RewriteContext hr)(Code) | | This gets called at every page, at the beginning. See if we should add
the mime headers and query parameters into the request object
|
tag_property | public void tag_property(RewriteContext hr)(Code) | | Convert the html tag "property" in to the request's property
Parameters: key - The name of the property to substitute. Variablesubstitution using the style described in Format.getProperty is permitted, e.g.:employee.${id}.last |
tag_tag | public void tag_tag(RewriteContext hr)(Code) | | Insert a liteteral "<".
Using the current scheme, there is no easy way to substitute into
a tag parameter. So we'll invent a "magic" tag (called tag)
that will allow us to create entities dynamically. Thus values
can be substituted into entities by escaping the entity as in:
<tag>a href=<property href></tag>
|
|
|