Class IncludeTemplate

  extended by sunlabs.brazil.template.Template
      extended by sunlabs.brazil.template.IncludeTemplate (view source)
All Implemented Interfaces:

public class IncludeTemplate
extends Template

Convert the html tag "include" in to text for an included html page. Attributes processed

Absolute url to fetch, and insert here
The request method. Defaults to GET (or POST if a message body is supplied.
Message body, if any. If "method", is not set, an http POST is issued.
Content type of message body. If not specfied, it is taken from the request headers.
Text to insert if URL can't be obtained.
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.
The proxy:port to use as a proxy (if any). If specified, it overrides the proxy property, in request.props.
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.
If true, all http headers to and from the target will be displayed on stderr.
If true no client http headers are used in this request (see note below).
The character encoding to use if it can't be automatically determined. Defaults to the default platform encoding.
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.
If name is specified and the result could not be obtained, the error message is placed here.
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=>

There are two common scenarios for using this template. in the first, an http resource is retrieved on behalf of the client browser: this template functions as a "proxy" for that resource. In the second scenario, the resource is retrieved as a side-effect of the initial browser request, such as to retrieve additional information to incorporate into the page. In this scenario, it is important to set noClientHeaders or bad things can happen when the http headers from the client become inconsistent with the request to the resource being retrieved.

Field Summary
Fields inherited from class sunlabs.brazil.template.Template
Constructor Summary
Method Summary
 void comment(RewriteContext hr)
          Treat comments of the form: <!#include ...> as if they were include tags.
 void tag_include(RewriteContext hr)
Methods inherited from class sunlabs.brazil.template.Template
done, init
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public IncludeTemplate()
Method Detail


public void tag_include(RewriteContext hr)


public void comment(RewriteContext hr)
Treat comments of the form: <!#include ...> as if they were include tags.

Version Kenai-svn-r24, Generated 08/18/09
Copyright (c) 2001-2009, Sun Microsystems.