javax.servlet.jsp.tagext |
Classes and interfaces for the definition of JavaServer Pages Tag Libraries.
The JavaServer Pages(tm) (JSP) 2.0 specification provides a portable
mechanism for the description of tag libraries.
A JSP tag library contains
- A Tag Library Descriptor
- A number of Tag Files or Tag handler classes defining
request-time behavior
- Additional classes and resources used at runtime
- Possibly some additional classes to provide extra translation
information
The JSP 2.0 specification and the reference implementation both contain
simple and moderately complex examples of actions defined using this
mechanism. These are available at JSP's web site, at
http://java.sun.com/products/jsp.
Some readers may want to consult those to get a quick feel for how
the mechanisms work together.
|
Java Source File Name | Type | Comment |
BodyContent.java | Class | An encapsulation of the evaluation of the body of an action so it is
available to a tag handler. |
BodyTag.java | Interface | The BodyTag interface extends IterationTag by defining additional
methods that let a tag handler manipulate the content of evaluating its body.
It is the responsibility of the tag handler to manipulate the body
content. |
BodyTagSupport.java | Class | A base class for defining tag handlers implementing BodyTag. |
DynamicAttributes.java | Interface | For a tag to declare that it accepts dynamic attributes, it must implement
this interface. |
FunctionInfo.java | Class | Information for a function in a Tag Library. |
IterationTag.java | Interface | The IterationTag interface extends Tag by defining one additional
method that controls the reevaluation of its body.
A tag handler that implements IterationTag is treated as one that
implements Tag regarding the doStartTag() and doEndTag() methods.
IterationTag provides a new method: doAfterBody() .
The doAfterBody() method is invoked after every body evaluation
to control whether the body will be reevaluated or not. |
JspFragment.java | Class | Encapsulates a portion of JSP code in an object that
can be invoked as many times as needed. |
JspTag.java | Interface | Serves as a base class for Tag and SimpleTag. |
PageData.java | Class | Translation-time information on a JSP page. |
SimpleTag.java | Interface | Interface for defining Simple Tag Handlers.
Simple Tag Handlers differ from Classic Tag Handlers in that instead
of supporting doStartTag() and doEndTag() ,
the SimpleTag interface provides a simple
doTag() method, which is called once and only once for any
given tag invocation. |
SimpleTagSupport.java | Class | A base class for defining tag handlers implementing SimpleTag.
The SimpleTagSupport class is a utility class intended to be used
as the base class for new simple tag handlers. |
Tag.java | Interface | The interface of a classic tag handler that does not want to manipulate
its body. |
TagAdapter.java | Class | Wraps any SimpleTag and exposes it using a Tag interface. |
TagAttributeInfo.java | Class | Information on the attributes of a Tag, available at translation time.
This class is instantiated from the Tag Library Descriptor file (TLD).
Only the information needed to generate code is included here. |
TagData.java | Class | The (translation-time only) attribute/value information for a tag instance. |
TagExtraInfo.java | Class | Optional class provided by the tag library author to describe additional
translation-time information not described in the TLD.
The TagExtraInfo class is mentioned in the Tag Library Descriptor file (TLD).
This class can be used:
- to indicate that the tag defines scripting variables
- to perform translation-time validation of the tag attributes.
It is the responsibility of the JSP translator that the initial value
to be returned by calls to getTagInfo() corresponds to a TagInfo
object for the tag being translated. |
TagFileInfo.java | Class | Tag information for a tag file in a Tag Library;
This class is instantiated from the Tag Library Descriptor file (TLD)
and is available only at translation time. |
TagInfo.java | Class | Tag information for a tag in a Tag Library;
This class is instantiated from the Tag Library Descriptor file (TLD)
and is available only at translation time. |
TagLibraryInfo.java | Class | Translation-time information associated with a taglib directive, and its
underlying TLD file. |
TagLibraryValidator.java | Class | Translation-time validator class for a JSP page. |
TagSupport.java | Class | A base class for defining new tag handlers implementing Tag.
The TagSupport class is a utility class intended to be used as
the base class for new tag handlers. |
TagVariableInfo.java | Class | Variable information for a tag in a Tag Library;
This class is instantiated from the Tag Library Descriptor file (TLD)
and is available only at translation time. |
TryCatchFinally.java | Interface | The auxiliary interface of a Tag, IterationTag or BodyTag tag
handler that wants additional hooks for managing resources.
This interface provides two new methods: doCatch(Throwable)
and doFinally(). |
ValidationMessage.java | Class | A validation message from either TagLibraryValidator or TagExtraInfo.
As of JSP 2.0, a JSP container must support a jsp:id attribute
to provide higher quality validation errors.
The container will track the JSP pages
as passed to the container, and will assign to each element
a unique "id", which is passed as the value of the jsp:id
attribute. |
VariableInfo.java | Class | Information on the scripting variables that are created/modified by
a tag (at run-time). |