public class PropsTemplate extends Template implements java.io.Serializable
url
instead of the one in request.url.
A new HTML tag,
<property>
is defined. It takes the following
tag attributes:
props
to replace the property
tag with.
default
is specified, the empty
string is used instead.
Constructor and Description |
---|
PropsTemplate() |
Modifier and Type | Method and Description |
---|---|
boolean |
init(RewriteContext hr)
This gets called at every page, at the beginning.
|
void |
tag_property(RewriteContext hr)
Convert the html tag "property" in to the request's property
|
void |
tag_slash_tag(RewriteContext hr)
Insert a literal ">"
|
void |
tag_tag(RewriteContext hr)
Insert a literal "<".
|
public boolean init(RewriteContext hr)
init
in interface TemplateInterface
init
in class Template
public void tag_property(RewriteContext hr)
key
- The name of the property to substitute. Variable
substitution using the style described in
Format.getProperty(java.util.Properties, java.lang.String, java.lang.String)
is permitted, e.g.:
employee.${id}.last
public void tag_tag(RewriteContext hr)
<tag>a href=<property href></tag>
public void tag_slash_tag(RewriteContext hr)