Tag Interface |
Interface name:
javax.servlet.jsp.tagext.Tag
Extends:
None
Implemented by:
Custom action tag handler classes and javax.servlet.jsp.tagext.TagSupport
Description
The Tag interface should be implemented by tag handler classes that do not need access to the body contents of the corresponding custom action element and do not need to iterate over the body of a custom action element.

doEndTag() |
public int doEndTag() throws JspException
Performs actions when the end tag is encountered. If this method returns SKIP_PAGE, execution of the rest of the page is aborted and the _jspService() method of JSP page implementation class returns. If EVAL_PAGE is returned, the code following the custom action in the _jspService() method is executed.

doStartTag() |
public int doStartTag() throws JspException
Performs actions when the start tag is encountered. This method is called by the web container after all property setter methods have been called. The return value controls how the action's body, if any, is handled. If it returns EVAL_BODY_INCLUDE, the web container evaluates the body and processes possible JSP elements. The result of the evaluation is added to the response. If SKIP_BODY is returned, the body is ignored.

A tag handler class that implements the BodyTag interface (extending the Tag interface) can return EVAL_BODY_TAG instead of EVAL_BODY_INCLUDE. The web container then creates a BodyContent instance and makes it available to the tag handler for special processing.

getParent() |
public Tag getParent()
Returns the tag handler's parent (the Tag instance for the enclosing action element, if any) or null if the tag handler doesn't have a parent.

release() |
public void release()
Removes the references to all objects held by this instance.

setPageContext() |
public void setPageContext(PageContext pc)
Saves a reference to the current PageContext.

setParent() |
public void setParent(Tag t)
Saves a reference to the tag handler's parent (the Tag instance for the enclosing action element).