Class DebugTemplate

  extended by sunlabs.brazil.template.Template
      extended by sunlabs.brazil.template.DebugTemplate (view source)
All Implemented Interfaces:
Serializable, TemplateInterface

public class DebugTemplate
extends Template
implements Serializable

Template class for printing stuff to stderr (for template debugging). This class is used by the TemplateHandler.

A new HTML tag, <debug> is defined. Any text between the <debug and > is printed on stderr, along with the session id and the url. Variable substitutions of the form ${...} are performed on the text.

The attribute "output" can be used to direct the output to either the console (output="console"), inline (output="inline"), or both (output="both") which is the default. The "output" attribute may be set as a configuration option as well. The Attribute "limit" may be uses to limit the maximum length of the output (in characters).

The property debug must be present for this template to function. Otherwise, all debug tags are removed.

If this configuration parameter is true, debugging is enabled.

See Also:
Serialized Form

Constructor Summary
Method Summary
 boolean init(RewriteContext hr)
          Called before this template processes any tags.
 void tag_debug(RewriteContext hr)
Methods inherited from class sunlabs.brazil.template.Template
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public DebugTemplate()
Method Detail


public boolean init(RewriteContext hr)
Description copied from class: Template
Called before this template processes any tags.

Specified by:
init in interface TemplateInterface
init in class Template


public void tag_debug(RewriteContext hr)

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