⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tag.html

📁 j2ee的API 1.4版本,j2ee的帮助文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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.4.2_02) on Thu Nov 13 17:20:47 PST 2003 --><TITLE>Tag (Java 2 Platform Ent. Ed. v1.4)</TITLE><META NAME="keywords" CONTENT="javax.servlet.jsp.tagext.Tag interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="Tag (Java 2 Platform Ent. Ed. v1.4)";}</SCRIPT></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=3 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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../javax/servlet/jsp/tagext/SimpleTag.html" title="interface in javax.servlet.jsp.tagext"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../javax/servlet/jsp/tagext/TryCatchFinally.html" title="interface in javax.servlet.jsp.tagext"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Tag.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.servlet.jsp.tagext</FONT><BR>Interface Tag</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../javax/servlet/jsp/tagext/JspTag.html" title="interface in javax.servlet.jsp.tagext">JspTag</A></DD></DL><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../javax/servlet/jsp/tagext/BodyTag.html" title="interface in javax.servlet.jsp.tagext">BodyTag</A>, <A HREF="../../../../javax/servlet/jsp/tagext/IterationTag.html" title="interface in javax.servlet.jsp.tagext">IterationTag</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../javax/servlet/jsp/tagext/BodyTagSupport.html" title="class in javax.servlet.jsp.tagext">BodyTagSupport</A>, <A HREF="../../../../javax/servlet/jsp/tagext/TagAdapter.html" title="class in javax.servlet.jsp.tagext">TagAdapter</A>, <A HREF="../../../../javax/servlet/jsp/tagext/TagSupport.html" title="class in javax.servlet.jsp.tagext">TagSupport</A></DD></DL><HR><DL><DT>public interface <B>Tag</B><DT>extends <A HREF="../../../../javax/servlet/jsp/tagext/JspTag.html" title="interface in javax.servlet.jsp.tagext">JspTag</A></DL><P>The interface of a classic tag handler that does not want to manipulate  its body.  The Tag interface defines the basic protocol between a Tag  handler and JSP page implementation class.  It defines the life cycle  and the methods to be invoked at start and end tag. <p><B>Properties</B></p> <p>The Tag interface specifies the setter and getter methods for the core pageContext and parent properties.</p> <p>The JSP page implementation object invokes setPageContext and setParent, in that order, before invoking doStartTag() or doEndTag().</p> <p><B>Methods</B></p> <p>There are two main actions: doStartTag and doEndTag.  Once all appropriate properties have been initialized, the doStartTag and doEndTag methods can be invoked on the tag handler.  Between these invocations, the tag handler is assumed to hold a state that must be preserved.  After the doEndTag invocation, the tag handler is available for further invocations (and it is expected to have retained its properties).</p> <p><B>Lifecycle</B></p> <p>Lifecycle details are described by the transition diagram below, with the following comments: <ul> <li> [1] This transition is intended to be for releasing long-term data. no guarantees are assumed on whether any properties have been retained or not. <li> [2] This transition happens if and only if the tag ends normally without raising an exception <li> [3] Some setters may be called again before a tag handler is  reused.  For instance, <code>setParent()</code> is called if it's  reused within the same page but at a different level,  <code>setPageContext()</code> is called if it's used in another page,  and attribute setters are called if the values differ or are expressed  as request-time attribute values. <li> Check the TryCatchFinally interface for additional details related to exception handling and resource management. </ul></p> <IMG src="doc-files/TagProtocol.gif"      alt="Lifecycle Details Transition Diagram for Tag"/>  <p>Once all invocations on the tag handler are completed, the release method is invoked on it.  Once a release method is invoked <em>all</em> properties, including parent and pageContext, are assumed to have been reset to an unspecified value. The page compiler guarantees that release() will be invoked on the Tag handler before the handler is released to the GC.</p> <p><B>Empty and Non-Empty Action</B></p> <p>If the TagLibraryDescriptor file indicates that the action must always have an empty action, by an &lt;body-content&gt; entry of "empty", then the doStartTag() method must return SKIP_BODY.</p> <p>Otherwise, the doStartTag() method may return SKIP_BODY or EVAL_BODY_INCLUDE.</p> <p>If SKIP_BODY is returned the body, if present, is not evaluated.</p>  <p>If EVAL_BODY_INCLUDE is returned, the body is evaluated and "passed through" to the current out.</p><P><P><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#EVAL_BODY_INCLUDE">EVAL_BODY_INCLUDE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Evaluate body into existing out stream. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#EVAL_PAGE">EVAL_PAGE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Continue evaluating the page. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#SKIP_BODY">SKIP_BODY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Skip body evaluation. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#SKIP_PAGE">SKIP_PAGE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Skip the rest of the page. </TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#doEndTag()">doEndTag</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Process the end tag for this instance. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#doStartTag()">doStartTag</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Process the start tag for this instance. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../javax/servlet/jsp/tagext/Tag.html" title="interface in javax.servlet.jsp.tagext">Tag</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#getParent()">getParent</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the parent (closest enclosing tag handler) for this tag handler. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#release()">release</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called on a Tag handler to release state. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#setPageContext(javax.servlet.jsp.PageContext)">setPageContext</A></B>(<A HREF="../../../../javax/servlet/jsp/PageContext.html" title="class in javax.servlet.jsp">PageContext</A>&nbsp;pc)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the current page context. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#setParent(javax.servlet.jsp.tagext.Tag)">setParent</A></B>(<A HREF="../../../../javax/servlet/jsp/tagext/Tag.html" title="interface in javax.servlet.jsp.tagext">Tag</A>&nbsp;t)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the parent (closest enclosing tag handler) of this tag handler. </TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="SKIP_BODY"><!-- --></A><H3>SKIP_BODY</H3><PRE>public static final int <B>SKIP_BODY</B></PRE><DL><DD>Skip body evaluation.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -