Name

SimpleTagSupport

Synopsis

The SimpleTagSupport class provides default implementations of all SimpleTag interface methods, plus a method for finding a parent of a specific type. It’s intended to be used as a superclass for simple tag handlers.

Synopsis

Class name:

javax.servlet.jsp.tagext.SimpleTagSupport

Extends:

None

Implements:

javax.servlet.jsp.tagext.SimpleTag

Implemented by:

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

Constructor

public SimpleTagSupport( )

Creates a new instance.

Methods

public void doTag( ) throws JspException, SkipPageException, java.io.IOException

Performs all processing for the tag handler using the properties and attributes previously set by the setter methods. If the page processing must be terminated after processing of this tag handler (e.g., if the tag handler forwards or redirects to another resource), this method must throw a SkipPageException. The default implementation in this class doesn’t do anything, so this method must be implemented by the subclass.

public static final JspTag findAncestorWithClass(JspTag from, Class klass)

Locates the closest parent tag handler of the specified class for the specified tag handler. It uses the getParent( ) method of the Tag and SimpleTag interfaces to look for the parent. For every instance of TagAdapter returned by a getParent( ) call, the object returned by TagAdapter getAdaptee( ) is compared to the specified ...

Get JavaServer Pages, 3rd 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.