Name

Tag

Synopsis

The Tag interface is the main tag handler interface. It should be implemented by tag handler classes that do not need the body of the corresponding action element evaluated more than once and that do not need access to the result of the body evaluation.

Synopsis

Interface name:

javax.servlet.jsp.tagext.Tag

Extends:

None

Implemented by:

Custom action tag handler classes.

Fields

public static final int EVAL_BODY_INCLUDE
public static final int EVAL_PAGE
public static final int SKIP_BODY
public static final int SKIP_PAGE

Methods

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.

public int doStartTag( ) throws JspException

Performs actions when the start tag is encountered. This method is called by the JSP container after all property setter methods have been called. The return value from this method controls how the action’s body is handled, if any. If it returns EVAL_BODY_INCLUDE, the JSP 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 IterationTag interface, which extends ...

Get JavaServer Pages, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.