Class CatchTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- org.apache.taglibs.standard.tag.common.core.CatchTag
-
- All Implemented Interfaces:
Serializable,IterationTag,JspTag,Tag,TryCatchFinally
public class CatchTag extends TagSupport implements TryCatchFinally
Tag handler for <catch> in JSTL 1.0.
<catch> simply catches any Throwables that occur in its body and optionally exposes them.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
-
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
-
Constructor Summary
Constructors Constructor Description CatchTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoCatch(Throwable t)Invoked if a Throwable occurs while evaluating the BODY inside a tag or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody().voiddoFinally()Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag.intdoStartTag()Default processing of the start tag, returning SKIP_BODY.voidrelease()Release state.voidsetVar(String var)-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Method Detail
-
release
public void release()
Description copied from class:TagSupportRelease state.- Specified by:
releasein interfaceTag- Overrides:
releasein classTagSupport- See Also:
Tag.release()
-
doStartTag
public int doStartTag()
Description copied from class:TagSupportDefault processing of the start tag, returning SKIP_BODY.- Specified by:
doStartTagin interfaceTag- Overrides:
doStartTagin classTagSupport- Returns:
- SKIP_BODY
- See Also:
Tag.doStartTag()
-
doCatch
public void doCatch(Throwable t)
Description copied from interface:TryCatchFinallyInvoked if a Throwable occurs while evaluating the BODY inside a tag or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody().This method is not invoked if the Throwable occurs during one of the setter methods.
This method may throw an exception (the same or a new one) that will be propagated further up the nest chain. If an exception is thrown, doFinally() will be invoked.
This method is intended to be used to respond to an exceptional condition.
- Specified by:
doCatchin interfaceTryCatchFinally- Parameters:
t- The throwable exception navigating through this tag.
-
doFinally
public void doFinally()
Description copied from interface:TryCatchFinallyInvoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag. This method is invoked even if an exception has occurred in the BODY of the tag, or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody().This method is not invoked if the Throwable occurs during one of the setter methods.
This method should not throw an Exception.
This method is intended to maintain per-invocation data integrity and resource management actions.
- Specified by:
doFinallyin interfaceTryCatchFinally
-
setVar
public void setVar(String var)
-
-