📄 tag.html
字号:
Valid return value for doStartTag and doAfterBody.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#javax.servlet.jsp.tagext.Tag.SKIP_BODY">Constant Field Values</A></DL></DL><HR><A NAME="EVAL_BODY_INCLUDE"><!-- --></A><H3>EVAL_BODY_INCLUDE</H3><PRE>public static final int <B>EVAL_BODY_INCLUDE</B></PRE><DL><DD>Evaluate body into existing out stream. Valid return value for doStartTag.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE">Constant Field Values</A></DL></DL><HR><A NAME="SKIP_PAGE"><!-- --></A><H3>SKIP_PAGE</H3><PRE>public static final int <B>SKIP_PAGE</B></PRE><DL><DD>Skip the rest of the page. Valid return value for doEndTag.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#javax.servlet.jsp.tagext.Tag.SKIP_PAGE">Constant Field Values</A></DL></DL><HR><A NAME="EVAL_PAGE"><!-- --></A><H3>EVAL_PAGE</H3><PRE>public static final int <B>EVAL_PAGE</B></PRE><DL><DD>Continue evaluating the page. Valid return value for doEndTag().<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#javax.servlet.jsp.tagext.Tag.EVAL_PAGE">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setPageContext(javax.servlet.jsp.PageContext)"><!-- --></A><H3>setPageContext</H3><PRE>public void <B>setPageContext</B>(<A HREF="../../../../javax/servlet/jsp/PageContext.html" title="class in javax.servlet.jsp">PageContext</A> pc)</PRE><DL><DD>Set the current page context. This method is invoked by the JSP page implementation object prior to doStartTag(). <p> This value is *not* reset by doEndTag() and must be explicitly reset by a page implementation if it changes between calls to doStartTag().<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pc</CODE> - The page context for this tag handler.</DL></DD></DL><HR><A NAME="setParent(javax.servlet.jsp.tagext.Tag)"><!-- --></A><H3>setParent</H3><PRE>public void <B>setParent</B>(<A HREF="../../../../javax/servlet/jsp/tagext/Tag.html" title="interface in javax.servlet.jsp.tagext">Tag</A> t)</PRE><DL><DD>Set the parent (closest enclosing tag handler) of this tag handler. Invoked by the JSP page implementation object prior to doStartTag(). <p> This value is *not* reset by doEndTag() and must be explicitly reset by a page implementation.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - The parent tag, or null.</DL></DD></DL><HR><A NAME="getParent()"><!-- --></A><H3>getParent</H3><PRE>public <A HREF="../../../../javax/servlet/jsp/tagext/Tag.html" title="interface in javax.servlet.jsp.tagext">Tag</A> <B>getParent</B>()</PRE><DL><DD>Get the parent (closest enclosing tag handler) for this tag handler. <p> The getParent() method can be used to navigate the nested tag handler structure at runtime for cooperation among custom actions; for example, the findAncestorWithClass() method in TagSupport provides a convenient way of doing this. <p> 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.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the current parent, or null if none.<DT><B>See Also:</B><DD><A HREF="../../../../javax/servlet/jsp/tagext/TagSupport.html#findAncestorWithClass(javax.servlet.jsp.tagext.Tag, java.lang.Class)"><CODE>TagSupport.findAncestorWithClass(javax.servlet.jsp.tagext.Tag, java.lang.Class)</CODE></A></DL></DD></DL><HR><A NAME="doStartTag()"><!-- --></A><H3>doStartTag</H3><PRE>public int <B>doStartTag</B>() throws <A HREF="../../../../javax/servlet/jsp/JspException.html" title="class in javax.servlet.jsp">JspException</A></PRE><DL><DD>Process the start tag for this instance. This method is invoked by the JSP page implementation object. <p> The doStartTag method assumes that the properties pageContext and parent have been set. It also assumes that any properties exposed as attributes have been set too. When this method is invoked, the body has not yet been evaluated. <p> This method returns Tag.EVAL_BODY_INCLUDE or BodyTag.EVAL_BODY_BUFFERED to indicate that the body of the action should be evaluated or SKIP_BODY to indicate otherwise. <p> When a Tag returns EVAL_BODY_INCLUDE the result of evaluating the body (if any) is included into the current "out" JspWriter as it happens and then doEndTag() is invoked. <p> BodyTag.EVAL_BODY_BUFFERED is only valid if the tag handler implements BodyTag. <p> The JSP container will resynchronize the values of any AT_BEGIN and NESTED variables (defined by the associated TagExtraInfo or TLD) after the invocation of doStartTag(), except for a tag handler implementing BodyTag whose doStartTag() method returns BodyTag.EVAL_BODY_BUFFERED.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>EVAL_BODY_INCLUDE if the tag wants to process body, SKIP_BODY if it does not want to process it.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/servlet/jsp/JspException.html" title="class in javax.servlet.jsp">JspException</A></CODE> - if an error occurred while processing this tag<DT><B>See Also:</B><DD><A HREF="../../../../javax/servlet/jsp/tagext/BodyTag.html" title="interface in javax.servlet.jsp.tagext"><CODE>BodyTag</CODE></A></DL></DD></DL><HR><A NAME="doEndTag()"><!-- --></A><H3>doEndTag</H3><PRE>public int <B>doEndTag</B>() throws <A HREF="../../../../javax/servlet/jsp/JspException.html" title="class in javax.servlet.jsp">JspException</A></PRE><DL><DD>Process the end tag for this instance. This method is invoked by the JSP page implementation object on all Tag handlers. <p> This method will be called after returning from doStartTag. The body of the action may or may not have been evaluated, depending on the return value of doStartTag. <p> If this method returns EVAL_PAGE, the rest of the page continues to be evaluated. If this method returns SKIP_PAGE, the rest of the page is not evaluated, the request is completed, and the doEndTag() methods of enclosing tags are not invoked. If this request was forwarded or included from another page (or Servlet), only the current page evaluation is stopped. <p> The JSP container will resynchronize the values of any AT_BEGIN and AT_END variables (defined by the associated TagExtraInfo or TLD) after the invocation of doEndTag().<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>indication of whether to continue evaluating the JSP page.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/servlet/jsp/JspException.html" title="class in javax.servlet.jsp">JspException</A></CODE> - if an error occurred while processing this tag</DL></DD></DL><HR><A NAME="release()"><!-- --></A><H3>release</H3><PRE>public void <B>release</B>()</PRE><DL><DD>Called on a Tag handler to release state. The page compiler guarantees that JSP page implementation objects will invoke this method on all tag handlers, but there may be multiple invocations on doStartTag and doEndTag in between.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" 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_bottom_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="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></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><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"> <A HREF="../../../../javax/servlet/jsp/tagext/SimpleTag.html" title="interface in javax.servlet.jsp.tagext"><B>PREV CLASS</B></A> <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> <A HREF="Tag.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><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -