FileDocCategorySizeDatePackage
CatchTag.javaAPI DocGlassfish v2 API3910Sat May 05 19:17:50 BST 2007org.apache.taglibs.standard.tag.common.core

CatchTag

public class CatchTag extends javax.servlet.jsp.tagext.TagSupport implements javax.servlet.jsp.tagext.TryCatchFinally

Tag handler for <catch> in JSTL 1.0.

<catch> simply catches any Throwables that occur in its body and optionally exposes them.

author
Shawn Bayern

Fields Summary
private String
var
private boolean
caught
Constructors Summary
public CatchTag()

        super();
        init();
    
Methods Summary
public voiddoCatch(java.lang.Throwable t)

        if (var != null)
            pageContext.setAttribute(var, t, PageContext.PAGE_SCOPE);
        caught = true;
    
public voiddoFinally()

        if (var != null && !caught)
            pageContext.removeAttribute(var, PageContext.PAGE_SCOPE);
    
public intdoStartTag()

        caught = false;
	return EVAL_BODY_INCLUDE;
    
private voidinit()

        var = null;
    
public voidrelease()

        super.release();
        init();
    
public voidsetVar(java.lang.String var)

        this.var = var;