Package sunlabs.brazil.template
Class IncludeTemplate
- java.lang.Object
-
- sunlabs.brazil.template.Template
-
- sunlabs.brazil.template.IncludeTemplate
-
- All Implemented Interfaces:
TemplateInterface
public class IncludeTemplate extends Template
Convert the html tag "include" in to text for an included html page. Attributes processed- href
- Absolute url to fetch, and insert here
- post
- Post data if any. If set, an http POST is issued. The post data is expected to be in www-url-encoded format.
- alt
- Text to insert if URL can't be obtained.
- name
- The name of the variable to put the result in. If this is specified, the content is not included in place. The template prefix is automatically prepended to the name.
- proxy
- The proxy:port to use as a proxy (if any).
If specified, it overrides the
proxy
property, inrequest.props
. - addheaders
- A white space delimited set of token names that
represent additional http headers to add to the target request.
For each token, the values [token].name and
[token].value in the
request.props
are used for the header name and value respectively. - encoding
- The character encoding to use if it can't be automatically determined. Defaults to the default platform encoding.
- getheaders
- The name of the variable prefix to use to
extract the http response headers.
If this not specified, no response headers are retrieved.
The result will be properties of the form:
[prefix].[getheaders].[header_name]=[header_value]
. If multiple entries exist for a particular header name, the values are combined as per HTTP conventions (e.g. v1, v2, ... vn). The pseudo headersstatus
andencoding
will contain the http status line and charset encoding, respectively. - error
- If name is specified and the result could not be obtained, the error message is placed here.
- queryList
- A list of property names whose names and values will be added to the url as query parameters. The values are properly url-encoded.
<include href=http://www.foo.com/index.html>
-
-
Constructor Summary
Constructors Constructor Description IncludeTemplate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
comment(RewriteContext hr)
Treat comments of the form:<!#include ...>
as if they were include tags.void
tag_include(RewriteContext hr)
-
-
-
Method Detail
-
tag_include
public void tag_include(RewriteContext hr)
-
comment
public void comment(RewriteContext hr)
Treat comments of the form:<!#include ...>
as if they were include tags.
-
-