📄 package-summary.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_14) on Mon Jan 28 05:47:08 PST 2008 --><TITLE>javax.servlet.jsp.tagext (Java EE 5)</TITLE><META NAME="keywords" CONTENT="javax.servlet.jsp.tagext package"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="javax.servlet.jsp.tagext (Java EE 5)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../javax/servlet/jsp/el/package-summary.html"><B>PREV PACKAGE</B></A> <A HREF="../../../../javax/transaction/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?javax/servlet/jsp/tagext/package-summary.html" target="_top"><B>FRAMES</B></A> <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><H2>Package javax.servlet.jsp.tagext</H2>Classes and interfaces for the definition of JavaServer Pages Tag Libraries.<P><B>See:</B><BR> <A HREF="#package_description"><B>Description</B></A><P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Interface Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/BodyTag.html" title="interface in javax.servlet.jsp.tagext">BodyTag</A></B></TD><TD>The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/DynamicAttributes.html" title="interface in javax.servlet.jsp.tagext">DynamicAttributes</A></B></TD><TD>For a tag to declare that it accepts dynamic attributes, it must implement this interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/IterationTag.html" title="interface in javax.servlet.jsp.tagext">IterationTag</A></B></TD><TD>The IterationTag interface extends Tag by defining one additional method that controls the reevaluation of its body.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/JspIdConsumer.html" title="interface in javax.servlet.jsp.tagext">JspIdConsumer</A></B></TD><TD>This interface indicates to the container that a tag handler wishes to be provided with a compiler generated ID.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/JspTag.html" title="interface in javax.servlet.jsp.tagext">JspTag</A></B></TD><TD>Serves as a base class for Tag and SimpleTag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/SimpleTag.html" title="interface in javax.servlet.jsp.tagext">SimpleTag</A></B></TD><TD>Interface for defining Simple Tag Handlers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html" title="interface in javax.servlet.jsp.tagext">Tag</A></B></TD><TD>The interface of a classic tag handler that does not want to manipulate its body.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/TryCatchFinally.html" title="interface in javax.servlet.jsp.tagext">TryCatchFinally</A></B></TD><TD>The auxiliary interface of a Tag, IterationTag or BodyTag tag handler that wants additional hooks for managing resources.</TD></TR></TABLE> <P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Class Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/BodyContent.html" title="class in javax.servlet.jsp.tagext">BodyContent</A></B></TD><TD>An encapsulation of the evaluation of the body of an action so it is available to a tag handler.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/BodyTagSupport.html" title="class in javax.servlet.jsp.tagext">BodyTagSupport</A></B></TD><TD>A base class for defining tag handlers implementing BodyTag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/FunctionInfo.html" title="class in javax.servlet.jsp.tagext">FunctionInfo</A></B></TD><TD>Information for a function in a Tag Library.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/JspFragment.html" title="class in javax.servlet.jsp.tagext">JspFragment</A></B></TD><TD>Encapsulates a portion of JSP code in an object that can be invoked as many times as needed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/PageData.html" title="class in javax.servlet.jsp.tagext">PageData</A></B></TD><TD>Translation-time information on a JSP page.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/SimpleTagSupport.html" title="class in javax.servlet.jsp.tagext">SimpleTagSupport</A></B></TD><TD>A base class for defining tag handlers implementing SimpleTag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/TagAdapter.html" title="class in javax.servlet.jsp.tagext">TagAdapter</A></B></TD><TD>Wraps any SimpleTag and exposes it using a Tag interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/TagAttributeInfo.html" title="class in javax.servlet.jsp.tagext">TagAttributeInfo</A></B></TD><TD>Information on the attributes of a Tag, available at translation time.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/TagData.html" title="class in javax.servlet.jsp.tagext">TagData</A></B></TD><TD>The (translation-time only) attribute/value information for a tag instance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/TagExtraInfo.html" title="class in javax.servlet.jsp.tagext">TagExtraInfo</A></B></TD><TD>Optional class provided by the tag library author to describe additional translation-time information not described in the TLD.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/TagFileInfo.html" title="class in javax.servlet.jsp.tagext">TagFileInfo</A></B></TD><TD>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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/TagInfo.html" title="class in javax.servlet.jsp.tagext">TagInfo</A></B></TD><TD>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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/TagLibraryInfo.html" title="class in javax.servlet.jsp.tagext">TagLibraryInfo</A></B></TD><TD>Translation-time information associated with a taglib directive, and its underlying TLD file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/TagLibraryValidator.html" title="class in javax.servlet.jsp.tagext">TagLibraryValidator</A></B></TD><TD>Translation-time validator class for a JSP page.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/TagSupport.html" title="class in javax.servlet.jsp.tagext">TagSupport</A></B></TD><TD>A base class for defining new tag handlers implementing Tag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/TagVariableInfo.html" title="class in javax.servlet.jsp.tagext">TagVariableInfo</A></B></TD><TD>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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/ValidationMessage.html" title="class in javax.servlet.jsp.tagext">ValidationMessage</A></B></TD><TD>A validation message from either TagLibraryValidator or TagExtraInfo.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../../javax/servlet/jsp/tagext/VariableInfo.html" title="class in javax.servlet.jsp.tagext">VariableInfo</A></B></TD><TD>Information on the scripting variables that are created/modified by a tag (at run-time).</TD></TR></TABLE> <P><A NAME="package_description"><!-- --></A><H2>Package javax.servlet.jsp.tagext Description</H2><P>Classes and interfaces for the definition of JavaServer Pages Tag Libraries.<p> Custom actions can be used by JSP authors and authoring tools tosimplify writing JSP pages. A custom action can be either an emptyor a non-empty action.<p>An empty tag has no body. There are two equivalent syntaxes, onewith separate start and end tags, and one where the start andend tags are combined. The two following examples are identical:</p><blockquote><code><pre><x:foo att="myObject"></foo><x:foo att="myObject"/></pre></code></blockquote><p>A non-empty tag has a start tag, a body, and an end tag. Aprototypical example is of the form:</p><blockquote><code><pre><x:foo att="myObject" > BODY</x:foo/></pre></code></blockquote><p>The JavaServer Pages(tm) (JSP) specification provides a portablemechanism for the description of tag libraries.<p>A JSP tag library contains<ul><li>A Tag Library Descriptor</li><li>A number of Tag Files or Tag handler classes defining request-time behavior</li><li>Additional classes and resources used at runtime</li><li>Possibly some additional classes to provide extra translation information</li></ul><p> This API is described in the following sections:<ol> <li><a href="#classic">Classic Tag Handlers</a></li> <li><a href="#bodycontent">Tag Handlers that want to access their Body Content</a></li> <li><a href="#dynamic">Dynamic Attributes</a></li> <li><a href="#thmgmt">Annotated Tag Handler Management Example</a></li> <li><a href="#coop">Cooperating Actions</a></li> <li><a href="#simple">Simple Tag Handlers</a></li> <li><a href="#fragment">JSP Fragments</a></li> <li><a href="#sths">Example Simple Tag Handler Scenario</a></li> <li><a href="#translation">Translation-time Classes</a></li></ol><a name="classic"><h2>1. Classic Tag Handlers</h2></a>This section introduces the notion of a tag handler and describes theclassic types of tag handler.<p> JSP 2.0 introduces a new type of Tag Handler called a Simple Tag Handler, which is described in a later section. The protocol for Simple Tag handlers is much more straightforward.<h3>Tag Handler</h3><p> A tag handler is a run-time, container-managed object thatevaluates custom actions during the execution of a JSP page. A taghandler supports a protocol that allows the JSP container to providegood integration of the server-side actions within a JSP page.<p> A tag handler is created initially using a zero argumentconstructor on its corresponding class; the method<code>java.beans.Beans.instantiate()</code> is not used.<p> A tag handler has some properties that are exposed to the page asattributes on an action; these properties are managed by the JSP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -