javax.servlet.jsp.tagext
Class SimpleTagSupport

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
All Implemented Interfaces:
JspTag, SimpleTag
Direct Known Subclasses:
JspTagSupport

public class SimpleTagSupport
extends java.lang.Object
implements SimpleTag

Support for SimpleTag.


Constructor Summary
SimpleTagSupport()
          Create a new SimpleTagSupport.
 
Method Summary
 void doTag()
          Does nothing.
static JspTag findAncestorWithClass(JspTag tag, java.lang.Class<?> cl)
          Finds an ancestor of a tag matching the class.
protected  JspFragment getJspBody()
          returns the body fragment.
protected  JspContext getJspContext()
          returns the context
 JspTag getParent()
          returns the parent
 void setJspBody(JspFragment body)
          Sets the body fragment.
 void setJspContext(JspContext context)
          Sets the context
 void setParent(JspTag parent)
          Sets the parent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTagSupport

public SimpleTagSupport()
Create a new SimpleTagSupport.

Method Detail

getParent

public JspTag getParent()
returns the parent

Specified by:
getParent in interface SimpleTag

setParent

public void setParent(JspTag parent)
Sets the parent

Specified by:
setParent in interface SimpleTag

getJspBody

protected JspFragment getJspBody()
returns the body fragment.


setJspBody

public void setJspBody(JspFragment body)
Sets the body fragment.

Specified by:
setJspBody in interface SimpleTag

getJspContext

protected JspContext getJspContext()
returns the context


setJspContext

public void setJspContext(JspContext context)
Sets the context

Specified by:
setJspContext in interface SimpleTag

doTag

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

Specified by:
doTag in interface SimpleTag
Throws:
java.io.IOException
JspException

findAncestorWithClass

public static final JspTag findAncestorWithClass(JspTag tag,
                                                 java.lang.Class<?> cl)
Finds an ancestor of a tag matching the class. The search is strict, i.e. only parents will be searched, not the tag itself.

Parameters:
tag - child tag to start searching.
cl - the class that the tag should implement.
Returns:
the matching tag or null.