com.mentata.sg8
Class TraceTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.SimpleTagSupport
      extended bycom.mentata.sg8.TraceTag
All Implemented Interfaces:
JspTag, SimpleTag

public class TraceTag
extends SimpleTagSupport

A tag handler that generates a stack trace for thrown exceptions. This tag handler is used to produce a stack trace for an error. It has a single action attribute for the exception thrown. The gateway error page uses the tag to add the stack trace at the tail of the output HTML for any non-SG8 exception.

Since:
0.7
Author:
Jon Roberts

Constructor Summary
TraceTag()
           
 
Method Summary
 void doTag()
          Writes the stack trace for the configured exception.
 void setException(Throwable exception)
          Defines an exception parameter for the tag context.
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraceTag

public TraceTag()
Method Detail

setException

public void setException(Throwable exception)
Defines an exception parameter for the tag context.

Parameters:
exception - an exception to trace

doTag

public void doTag()
           throws IOException
Writes the stack trace for the configured exception.

Throws:
IOException - if there was an error writing to the output stream