All Implemented Interfaces:
The SimpleTagSupport class is a utility class intended to be used as the base class for new simple tag handlers. The SimpleTagSupport class implements the SimpleTag interface and adds additional convenience methods including getter methods for the properties in SimpleTag.
|Method from javax.servlet.jsp.tagext.SimpleTagSupport Summary:|
|doTag, findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent|
|Methods from java.lang.Object:|
|clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait|
|Method from javax.servlet.jsp.tagext.SimpleTagSupport Detail:|
public void doTag() throws JspException, IOException
public static final JspTag findAncestorWithClass(JspTag from, Class<?> klass)
For every instance of TagAdapter encountered while traversing the ancestors, the tag handler returned by TagAdapter.getAdaptee() - instead of the TagAdpater itself - is compared to klass. If the tag handler matches, it - and not its TagAdapter - is returned.
The current version of the specification only provides one formal way of indicating the observable type of a tag handler: its tag handler implementation class, described in the tag-class subelement of the tag element. This is extended in an informal manner by allowing the tag library author to indicate in the description subelement an observable type. The type should be a subtype of the tag handler implementation class or void. This addititional constraint can be exploited by a specialized container that knows about that specific tag library, as in the case of the JSP standard tag library.
When a tag library author provides information on the observable type of a tag handler, client programmatic code should adhere to that constraint. Specifically, the Class passed to findAncestorWithClass should be a subtype of the observable type.
protected JspFragment getJspBody()
protected JspContext getJspContext()
public JspTag getParent()
public void setJspBody(JspFragment jspBody)
public void setJspContext(JspContext pc)
public void setParent(JspTag parent)
The container invokes this method only if this tag invocation is nested within another tag invocation.