pagecontext.html

来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 1,122 行 · 第 1/4 页

HTML
1,122
字号
public abstract <A HREF="../../../javax/servlet/jsp/JspWriter.html">JspWriter</A> <B>getOut</B>()</PRE>
<DL>
<DD>The current value of the out object (a JspWriter).<DD><DL>
<DT><B>Returns:</B><DD>the current JspWriter stream being used for client response</DL>
</DD>
</DL>
<HR>

<A NAME="getSession()"><!-- --></A><H3>
getSession</H3>
<PRE>
public abstract <A HREF="../../../javax/servlet/http/HttpSession.html">HttpSession</A> <B>getSession</B>()</PRE>
<DL>
<DD>The current value of the session object (an HttpSession).<DD><DL>
<DT><B>Returns:</B><DD>the HttpSession for this PageContext or null</DL>
</DD>
</DL>
<HR>

<A NAME="getPage()"><!-- --></A><H3>
getPage</H3>
<PRE>
public abstract java.lang.Object <B>getPage</B>()</PRE>
<DL>
<DD>The current value of the page object (a Servlet).<DD><DL>
<DT><B>Returns:</B><DD>the Page implementation class instance (Servlet)  associated with this PageContext</DL>
</DD>
</DL>
<HR>

<A NAME="getRequest()"><!-- --></A><H3>
getRequest</H3>
<PRE>
public abstract <A HREF="../../../javax/servlet/ServletRequest.html">ServletRequest</A> <B>getRequest</B>()</PRE>
<DL>
<DD>The current value of the request object (a ServletRequest).<DD><DL>
<DT><B>Returns:</B><DD>The ServletRequest for this PageContext</DL>
</DD>
</DL>
<HR>

<A NAME="getResponse()"><!-- --></A><H3>
getResponse</H3>
<PRE>
public abstract <A HREF="../../../javax/servlet/ServletResponse.html">ServletResponse</A> <B>getResponse</B>()</PRE>
<DL>
<DD>The current value of the response object (a ServletResponse).<DD><DL>
<DT><B>Returns:</B><DD>the ServletResponse for this PageContext</DL>
</DD>
</DL>
<HR>

<A NAME="getException()"><!-- --></A><H3>
getException</H3>
<PRE>
public abstract java.lang.Exception <B>getException</B>()</PRE>
<DL>
<DD>The current value of the exception object (an Exception).<DD><DL>
<DT><B>Returns:</B><DD>any exception passed to this as an errorpage</DL>
</DD>
</DL>
<HR>

<A NAME="getServletConfig()"><!-- --></A><H3>
getServletConfig</H3>
<PRE>
public abstract <A HREF="../../../javax/servlet/ServletConfig.html">ServletConfig</A> <B>getServletConfig</B>()</PRE>
<DL>
<DD>The ServletConfig instance.<DD><DL>
<DT><B>Returns:</B><DD>the ServletConfig for this PageContext</DL>
</DD>
</DL>
<HR>

<A NAME="getServletContext()"><!-- --></A><H3>
getServletContext</H3>
<PRE>
public abstract <A HREF="../../../javax/servlet/ServletContext.html">ServletContext</A> <B>getServletContext</B>()</PRE>
<DL>
<DD>The ServletContext instance.<DD><DL>
<DT><B>Returns:</B><DD>the ServletContext for this PageContext</DL>
</DD>
</DL>
<HR>

<A NAME="forward(java.lang.String)"><!-- --></A><H3>
forward</H3>
<PRE>
public abstract void <B>forward</B>(java.lang.String&nbsp;relativeUrlPath)
                      throws <A HREF="../../../javax/servlet/ServletException.html">ServletException</A>,
                             java.io.IOException</PRE>
<DL>
<DD><p>
 This method is used to re-direct, or "forward" the current ServletRequest and ServletResponse to another active component in the application.
 </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>
 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><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><A HREF="../../../javax/servlet/ServletException.html">ServletException</A></CODE> - &nbsp;<DD><CODE>java.io.IOException</CODE> - &nbsp;<DD><CODE>java.lang.IllegalArgumentException</CODE> - if target resource URL is unresolvable<DD><CODE>java.lang.IllegalStateException</CODE> - if <code> ServletResponse </code> is not in a state where a forward can be performed<DD><CODE>java.lang.SecurityException</CODE> - if target resource cannot be accessed by caller</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 <A HREF="../../../javax/servlet/ServletException.html">ServletException</A>,
                             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><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><A HREF="../../../javax/servlet/ServletException.html">ServletException</A></CODE> - &nbsp;<DD><CODE>java.io.IOException</CODE> - &nbsp;<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the target resource URL is unresolvable<DD><CODE>java.lang.SecurityException</CODE> - if target resource cannot be accessed by caller</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 <A HREF="../../../javax/servlet/ServletException.html">ServletException</A>,
                                         java.io.IOException</PRE>
<DL>
<DD><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>
 This method is kept for backwards compatiblity reasons.  Newly
 generated code should use PageContext.handlePageException(Throwable).<DD><DL>
<DT><B>Parameters:</B><DD><CODE>e</CODE> - the exception to be handled<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/servlet/ServletException.html">ServletException</A></CODE> - &nbsp;<DD><CODE>java.io.IOException</CODE> - &nbsp;<DD><CODE>java.lang.NullPointerException</CODE> - if the exception is null<DD><CODE>java.lang.SecurityException</CODE> - if target resource cannot be accessed by caller<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 <A HREF="../../../javax/servlet/ServletException.html">ServletException</A>,
                                         java.io.IOException</PRE>
<DL>
<DD><p>
 This method is identical to the handlePageException(Exception),
 except that it accepts a Throwable.  This is the preferred method
 to use as it allows proper implementation of the errorpage
 semantics.

 <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.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>t</CODE> - the throwable to be handled<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/servlet/ServletException.html">ServletException</A></CODE> - &nbsp;<DD><CODE>java.io.IOException</CODE> - &nbsp;<DD><CODE>java.lang.NullPointerException</CODE> - if the exception is null<DD><CODE>java.lang.SecurityException</CODE> - if target resource cannot be accessed by caller<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">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<DD><DL>
<DT><B>Returns:</B><DD>the new BodyContent</DL>
</DD>
</DL>
<HR>

<A NAME="popBody()"><!-- --></A><H3>
popBody</H3>
<PRE>
public <A HREF="../../../javax/servlet/jsp/JspWriter.html">JspWriter</A> <B>popBody</B>()</PRE>
<DL>
<DD>Return the previous JspWriter "out" saved by the matching
 pushBody(), and update the value of the "out" attribute in
 the page scope attribute namespace of the PageConxtext<DD><DL>
<DT><B>Returns:</B><DD>the saved JspWriter.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <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>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/servlet/jsp/JspWriter.html"><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></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&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>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

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