Name

TagSupport Class

Class name:

javax.servlet.jsp.tagext.TagSupport

Extends:

None

Implements:

Tag, java.io.Serializable

Implemented by:

Internal container-dependent class. Most containers use the reference implementation of the class (developed in the Apache Jakarta project).

Description

TagSupport is a support class that provides default implementations for all Tag interface methods. It’s intended to be used as a superclass for tag handlers that do not need access to the body contents of the corresponding custom action elements.

Constructor

public TagSupport()

Creates a new instance with the specified name and value.

Methods

public int doEndTag() throws JspException

Returns EVAL_PAGE.

public int doStartTag() throws JspException

Returns SKIP_BODY.

public static final Tag findAncestorWithClass(Tag from, Class class)

Returns the instance of the specified class, found by testing for a match of each parent in a tag handler nesting structure (corresponding to nested action elements) starting with the specified Tag instance, or null if not found.

public String getId()

Returns the id attribute value, or null if not set.

public Tag getParent()

Returns the parent of this Tag instance (representing the action element that contains the action element corresponding to this Tag instance), or null if the instance has no parent (i.e., is at the top level in the JSP page).

public Object getValue(String k)

Returns the value for the specified attribute that has been set with the setValue() method, ...

Get JavaServer Pages Pocket Reference 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.