Class TCFTestTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
jakarta.servlet.jsp.tagext.BodyTagSupport
ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.trycatchfinally.TCFTestTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.BodyTag,jakarta.servlet.jsp.tagext.IterationTag,jakarta.servlet.jsp.tagext.JspTag,jakarta.servlet.jsp.tagext.Tag,jakarta.servlet.jsp.tagext.TryCatchFinally,Serializable
public class TCFTestTag
extends jakarta.servlet.jsp.tagext.BodyTagSupport
implements jakarta.servlet.jsp.tagext.TryCatchFinally
- See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.jsp.tagext.BodyTagSupport
bodyContentFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFEREDFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintAfter the body evaluation: do not reevaluate and continue with the page.voidInvoked 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().intdoEndTag()Default processing of the end tag returning EVAL_PAGE.voidInvoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag.voidPrepare for evaluation of the body just before the first body evaluation: no action.intDefault processing of the start tag returning EVAL_BODY_BUFFEREDReturns the location the exception will be thrown from.voidsetLocation(String location) Sets the location where an exception will occur.Methods inherited from class jakarta.servlet.jsp.tagext.BodyTagSupport
getBodyContent, getPreviousOut, release, setBodyContentMethods inherited from class jakarta.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
-
Constructor Details
-
TCFTestTag
public TCFTestTag()Default constructor.
-
-
Method Details
-
getLocation
Returns the location the exception will be thrown from.- Returns:
- the location of the exception
-
setLocation
Sets the location where an exception will occur.- Parameters:
location- - the location- Throws:
jakarta.servlet.jsp.JspException
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspExceptionDefault processing of the start tag returning EVAL_BODY_BUFFERED- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjakarta.servlet.jsp.tagext.BodyTagSupport- Returns:
- EVAL_BODY_BUFFERED
- Throws:
jakarta.servlet.jsp.JspException- if an error occurred while processing this tag- See Also:
-
Tag.doStartTag()
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionDefault processing of the end tag returning EVAL_PAGE.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.BodyTagSupport- Returns:
- EVAL_PAGE
- Throws:
jakarta.servlet.jsp.JspException- if an error occurred while processing this tag- See Also:
-
Tag.doEndTag()
-
doInitBody
public void doInitBody() throws jakarta.servlet.jsp.JspExceptionPrepare for evaluation of the body just before the first body evaluation: no action.- Specified by:
doInitBodyin interfacejakarta.servlet.jsp.tagext.BodyTag- Overrides:
doInitBodyin classjakarta.servlet.jsp.tagext.BodyTagSupport- Throws:
jakarta.servlet.jsp.JspException- if an error occurred while processing this tag- See Also:
-
BodyTagSupport.setBodyContent(jakarta.servlet.jsp.tagext.BodyContent)doAfterBody()BodyTag.doInitBody()
-
doAfterBody
public int doAfterBody() throws jakarta.servlet.jsp.JspExceptionAfter the body evaluation: do not reevaluate and continue with the page. By default nothing is done with the bodyContent data (if any).- Specified by:
doAfterBodyin interfacejakarta.servlet.jsp.tagext.IterationTag- Overrides:
doAfterBodyin classjakarta.servlet.jsp.tagext.BodyTagSupport- Returns:
- SKIP_BODY
- Throws:
jakarta.servlet.jsp.JspException- if an error occurred while processing this tag- See Also:
-
doInitBody()IterationTag.doAfterBody()
-
doCatch
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().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 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 interfacejakarta.servlet.jsp.tagext.TryCatchFinally- Parameters:
t- The throwable exception navigating through this tag.- Throws:
Throwable
-
doFinally
public void doFinally()Invoked 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 interfacejakarta.servlet.jsp.tagext.TryCatchFinally
-