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

📄 pagecontext.html

📁 jsp doc sun java
💻 HTML
📖 第 1 页 / 共 4 页
字号:
 <p> It is only valid to call this method from a <code> Thread </code> executing within a <code> _jspService(...) </code> method of a JSP. </p> <p> Once this method has been called successfully, it is illegal for the calling <code> Thread </code> to attempt to modify the <code> ServletResponse </code> object.  Any such attempt to do so, shall result in undefined behavior. Typically, callers immediately return from  <code> _jspService(...) </code> after calling this method. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>relativeUrlPath</CODE> - specifies the relative URL path to the target      resource as described above<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if <code> ServletResponse </code> is not      in a state where a forward can be performed<DD><CODE>javax.servlet.ServletException</CODE> - if the page that was forwarded to throws     a ServletException<DD><CODE>java.io.IOException</CODE> - if an I/O error occurred while forwarding</DL></DD></DL><HR><A NAME="include(java.lang.String)"><!-- --></A><H3>include</H3><PRE>public abstract void <B>include</B>(java.lang.String&nbsp;relativeUrlPath)                      throws javax.servlet.ServletException,                             java.io.IOException</PRE><DL><DD><p> Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread. The output of the target resources processing of the request is written directly to the ServletResponse output stream. </p> <p> The current JspWriter "out" for this JSP is flushed as a side-effect of this call, prior to processing the include. </p> <p> If the <I> relativeUrlPath </I> begins with a "/" then the URL specified is calculated relative to the DOCROOT of the <code>ServletContext</code> for this JSP. If the path does not begin with a "/" then the URL  specified is calculated relative to the URL of the request that was mapped to the calling JSP. </p> <p> It is only valid to call this method from a <code> Thread </code> executing within a <code> _jspService(...) </code> method of a JSP. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>relativeUrlPath</CODE> - specifies the relative URL path to the target      resource to be included<DT><B>Throws:</B><DD><CODE>javax.servlet.ServletException</CODE> - if the page that was forwarded to throws     a ServletException<DD><CODE>java.io.IOException</CODE> - if an I/O error occurred while forwarding</DL></DD></DL><HR><A NAME="include(java.lang.String, boolean)"><!-- --></A><H3>include</H3><PRE>public abstract void <B>include</B>(java.lang.String&nbsp;relativeUrlPath,                             boolean&nbsp;flush)                      throws javax.servlet.ServletException,                             java.io.IOException</PRE><DL><DD><p> Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread. The output of the target resources processing of the request is written directly to the current JspWriter returned by a call to getOut(). </p> <p> If flush is true, The current JspWriter "out" for this JSP  is flushed as a side-effect of this call, prior to processing  the include.  Otherwise, the JspWriter "out" is not flushed. </p> <p> If the <i>relativeUrlPath</i> begins with a "/" then the URL specified is calculated relative to the DOCROOT of the <code>ServletContext</code> for this JSP. If the path does not begin with a "/" then the URL  specified is calculated relative to the URL of the request that was mapped to the calling JSP. </p> <p> It is only valid to call this method from a <code> Thread </code> executing within a <code> _jspService(...) </code> method of a JSP. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>relativeUrlPath</CODE> - specifies the relative URL path to the      target resource to be included<DD><CODE>flush</CODE> - True if the JspWriter is to be flushed before the include,     or false if not.<DT><B>Throws:</B><DD><CODE>javax.servlet.ServletException</CODE> - if the page that was forwarded to throws     a ServletException<DD><CODE>java.io.IOException</CODE> - if an I/O error occurred while forwarding<DT><B>Since:</B></DT>  <DD>2.0</DD></DL></DD></DL><HR><A NAME="handlePageException(java.lang.Exception)"><!-- --></A><H3>handlePageException</H3><PRE>public abstract void <B>handlePageException</B>(java.lang.Exception&nbsp;e)                                  throws javax.servlet.ServletException,                                         java.io.IOException</PRE><DL><DD><p> This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP.  If forwarding is not possible (for example because the response has already been committed), an implementation dependent mechanism should be used to invoke the error page (e.g. "including" the error page instead). <p> If no error page is defined in the page, the exception should be rethrown so that the standard servlet error handling takes over. <p> A JSP implementation class shall typically clean up any local state prior to invoking this and will return immediately thereafter. It is illegal to generate any output to the client, or to modify any  ServletResponse state after invoking this call. <p> This method is kept for backwards compatiblity reasons.  Newly generated code should use PageContext.handlePageException(Throwable).<P><DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - the exception to be handled<DT><B>Throws:</B><DD><CODE>javax.servlet.ServletException</CODE> - if an error occurs while invoking the error page<DD><CODE>java.io.IOException</CODE> - if an I/O error occurred while invoking the error     page<DD><CODE>java.lang.NullPointerException</CODE> - if the exception is null<DT><B>See Also:</B><DD><A HREF="../../../javax/servlet/jsp/PageContext.html#handlePageException(java.lang.Throwable)"><CODE>handlePageException(Throwable)</CODE></A></DL></DD></DL><HR><A NAME="handlePageException(java.lang.Throwable)"><!-- --></A><H3>handlePageException</H3><PRE>public abstract void <B>handlePageException</B>(java.lang.Throwable&nbsp;t)                                  throws javax.servlet.ServletException,                                         java.io.IOException</PRE><DL><DD><p> This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP.  If forwarding is not possible (for example because the response has already been committed), an implementation dependent mechanism should be used to invoke the error page (e.g. "including" the error page instead). <p> If no error page is defined in the page, the exception should be rethrown so that the standard servlet error handling takes over. <p> This method is intended to process an unhandled "page" level exception by redirecting the exception to either the specified error page for this JSP, or if none was specified, to perform some implementation dependent action. <p> A JSP implementation class shall typically clean up any local state prior to invoking this and will return immediately thereafter. It is illegal to generate any output to the client, or to modify any  ServletResponse state after invoking this call.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - the throwable to be handled<DT><B>Throws:</B><DD><CODE>javax.servlet.ServletException</CODE> - if an error occurs while invoking the error page<DD><CODE>java.io.IOException</CODE> - if an I/O error occurred while invoking the error     page<DD><CODE>java.lang.NullPointerException</CODE> - if the exception is null<DT><B>See Also:</B><DD><A HREF="../../../javax/servlet/jsp/PageContext.html#handlePageException(java.lang.Exception)"><CODE>handlePageException(Exception)</CODE></A></DL></DD></DL><HR><A NAME="pushBody()"><!-- --></A><H3>pushBody</H3><PRE>public <A HREF="../../../javax/servlet/jsp/tagext/BodyContent.html" title="class in javax.servlet.jsp.tagext">BodyContent</A> <B>pushBody</B>()</PRE><DL><DD>Return a new BodyContent object, save the current "out" JspWriter, and update the value of the "out" attribute in the page scope attribute namespace of the PageContext.<P><DD><DL><DT><B>Returns:</B><DD>the new BodyContent</DL></DD></DL><HR><A NAME="getErrorData()"><!-- --></A><H3>getErrorData</H3><PRE>public <A HREF="../../../javax/servlet/jsp/ErrorData.html" title="class in javax.servlet.jsp">ErrorData</A> <B>getErrorData</B>()</PRE><DL><DD>Provides convenient access to error information.<P><DD><DL><DT><B>Returns:</B><DD>an ErrorData instance containing information about the  error, as obtained from the request attributes, as per the  Servlet specification.  If this is not an error page (that is, if the isErrorPage attribute of the page directive is not set to "true"), the information is meaningless.<DT><B>Since:</B></DT>  <DD>2.0</DD></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>&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="class-use/PageContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/servlet/jsp/JspWriter.html" title="class in javax.servlet.jsp"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="PageContext.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;<A HREF="#constructor_summary">CONSTR</A>&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;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright &copy; 1999-2002 The Apache Software Foundation.  All Rights Reserved.</BODY></HTML>

⌨️ 快捷键说明

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