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

    bodyContent

    Fields inherited from class jakarta.servlet.jsp.tagext.TagSupport

    id, pageContext

    Fields inherited from interface jakarta.servlet.jsp.tagext.BodyTag

    EVAL_BODY_BUFFERED

    Fields inherited from interface jakarta.servlet.jsp.tagext.IterationTag

    EVAL_BODY_AGAIN

    Fields inherited from interface jakarta.servlet.jsp.tagext.Tag

    EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    After the body evaluation: do not reevaluate and continue with the page.
    void
    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().
    int
    Default processing of the end tag returning EVAL_PAGE.
    void
    Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag.
    void
    Prepare for evaluation of the body just before the first body evaluation: no action.
    int
    Default processing of the start tag returning EVAL_BODY_BUFFERED
    Returns the location the exception will be thrown from.
    void
    setLocation(String location)
    Sets the location where an exception will occur.

    Methods inherited from class jakarta.servlet.jsp.tagext.BodyTagSupport

    getBodyContent, getPreviousOut, release, setBodyContent

    Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport

    findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface jakarta.servlet.jsp.tagext.Tag

    getParent, setPageContext, setParent
  • Constructor Details

    • TCFTestTag

      public TCFTestTag()
      Default constructor.
  • Method Details

    • getLocation

      public String getLocation()
      Returns the location the exception will be thrown from.
      Returns:
      the location of the exception
    • setLocation

      public void setLocation(String location) throws jakarta.servlet.jsp.JspException
      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.JspException
      Default processing of the start tag returning EVAL_BODY_BUFFERED
      Specified by:
      doStartTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doStartTag in class jakarta.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.JspException
      Default processing of the end tag returning EVAL_PAGE.
      Specified by:
      doEndTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doEndTag in class jakarta.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.JspException
      Prepare for evaluation of the body just before the first body evaluation: no action.
      Specified by:
      doInitBody in interface jakarta.servlet.jsp.tagext.BodyTag
      Overrides:
      doInitBody in class jakarta.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.JspException
      After the body evaluation: do not reevaluate and continue with the page. By default nothing is done with the bodyContent data (if any).
      Specified by:
      doAfterBody in interface jakarta.servlet.jsp.tagext.IterationTag
      Overrides:
      doAfterBody in class jakarta.servlet.jsp.tagext.BodyTagSupport
      Returns:
      SKIP_BODY
      Throws:
      jakarta.servlet.jsp.JspException - if an error occurred while processing this tag
      See Also:
    • doCatch

      public void doCatch(Throwable t) throws Throwable
      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:
      doCatch in interface jakarta.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:
      doFinally in interface jakarta.servlet.jsp.tagext.TryCatchFinally