sunlabs.brazil.template
Class IncludeTemplate

java.lang.Object
  extended by sunlabs.brazil.template.Template
      extended by 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, in request.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 headers status and encoding 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.
Example: <include href=http://www.foo.com/index.html>


Field Summary
 
Fields inherited from class sunlabs.brazil.template.Template
debug
 
Constructor Summary
IncludeTemplate()
           
 
Method Summary
 void comment(RewriteContext hr)
          Treat comments of the form: <!
 void tag_include(RewriteContext hr)
           
 
Methods inherited from class sunlabs.brazil.template.Template
debug, debug, done, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncludeTemplate

public IncludeTemplate()
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.