pagecontext.html

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

HTML
1,122
字号
SESSION_SCOPE</H3>
<PRE>
public static final int <B>SESSION_SCOPE</B></PRE>
<DL>
<DD>Session scope (only valid if this page participates in a session):
 the named reference remains available from the HttpSession (if any)
 associated with the Servlet until the HttpSession is invalidated.</DL>
<HR>

<A NAME="APPLICATION_SCOPE"><!-- --></A><H3>
APPLICATION_SCOPE</H3>
<PRE>
public static final int <B>APPLICATION_SCOPE</B></PRE>
<DL>
<DD>Application scope: named reference remains available in the 
 ServletContext until it is reclaimed.</DL>
<HR>

<A NAME="PAGE"><!-- --></A><H3>
PAGE</H3>
<PRE>
public static final java.lang.String <B>PAGE</B></PRE>
<DL>
<DD>Name used to store the Servlet in this PageContext's nametables.</DL>
<HR>

<A NAME="PAGECONTEXT"><!-- --></A><H3>
PAGECONTEXT</H3>
<PRE>
public static final java.lang.String <B>PAGECONTEXT</B></PRE>
<DL>
<DD>Name used to store this PageContext in it's own name table.</DL>
<HR>

<A NAME="REQUEST"><!-- --></A><H3>
REQUEST</H3>
<PRE>
public static final java.lang.String <B>REQUEST</B></PRE>
<DL>
<DD>Name used to store ServletRequest in PageContext name table.</DL>
<HR>

<A NAME="RESPONSE"><!-- --></A><H3>
RESPONSE</H3>
<PRE>
public static final java.lang.String <B>RESPONSE</B></PRE>
<DL>
<DD>Name used to store ServletResponse in PageContext name table.</DL>
<HR>

<A NAME="CONFIG"><!-- --></A><H3>
CONFIG</H3>
<PRE>
public static final java.lang.String <B>CONFIG</B></PRE>
<DL>
<DD>Name used to store ServletConfig in PageContext name table.</DL>
<HR>

<A NAME="SESSION"><!-- --></A><H3>
SESSION</H3>
<PRE>
public static final java.lang.String <B>SESSION</B></PRE>
<DL>
<DD>Name used to store HttpSession in PageContext name table.</DL>
<HR>

<A NAME="OUT"><!-- --></A><H3>
OUT</H3>
<PRE>
public static final java.lang.String <B>OUT</B></PRE>
<DL>
<DD>Name used to store current JspWriter in PageContext name table.</DL>
<HR>

<A NAME="APPLICATION"><!-- --></A><H3>
APPLICATION</H3>
<PRE>
public static final java.lang.String <B>APPLICATION</B></PRE>
<DL>
<DD>Name used to store ServletContext in PageContext name table.</DL>
<HR>

<A NAME="EXCEPTION"><!-- --></A><H3>
EXCEPTION</H3>
<PRE>
public static final java.lang.String <B>EXCEPTION</B></PRE>
<DL>
<DD>Name used to store uncaught exception in ServletRequest attribute list and PageContext name table.</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="PageContext()"><!-- --></A><H3>
PageContext</H3>
<PRE>
public <B>PageContext</B>()</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="initialize(javax.servlet.Servlet, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, boolean, int, boolean)"><!-- --></A><H3>
initialize</H3>
<PRE>
public abstract void <B>initialize</B>(<A HREF="../../../javax/servlet/Servlet.html">Servlet</A>&nbsp;servlet,
                                <A HREF="../../../javax/servlet/ServletRequest.html">ServletRequest</A>&nbsp;request,
                                <A HREF="../../../javax/servlet/ServletResponse.html">ServletResponse</A>&nbsp;response,
                                java.lang.String&nbsp;errorPageURL,
                                boolean&nbsp;needsSession,
                                int&nbsp;bufferSize,
                                boolean&nbsp;autoFlush)
                         throws java.io.IOException,
                                java.lang.IllegalStateException,
                                java.lang.IllegalArgumentException</PRE>
<DL>
<DD><p>
 The initialize method is called to initialize an uninitialized PageContext
 so that it may be used by a JSP Implementation class to service an
 incoming request and response within it's _jspService() method.

 <p>
 This method is typically called from JspFactory.getPageContext() in
 order to initialize state.

 <p>
 This method is required to create an initial JspWriter, and associate
 the "out" name in page scope with this newly created object.

 <p>
 This method should not be used by page  or tag library authors.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>servlet</CODE> - The Servlet that is associated with this PageContext<DD><CODE>request</CODE> - The currently pending request for this Servlet<DD><CODE>response</CODE> - The currently pending response for this Servlet<DD><CODE>errorPageURL</CODE> - The value of the errorpage attribute from the page directive or null<DD><CODE>needsSession</CODE> - The value of the session attribute from the page directive<DD><CODE>bufferSize</CODE> - The value of the buffer attribute from the page directive<DD><CODE>autoFlush</CODE> - The value of the autoflush attribute from the page directive<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - during creation of JspWriter<DD><CODE>java.lang.IllegalStateException</CODE> - if out not correctly initialized</DL>
</DD>
</DL>
<HR>

<A NAME="release()"><!-- --></A><H3>
release</H3>
<PRE>
public abstract void <B>release</B>()</PRE>
<DL>
<DD><p>
 This method shall "reset" the internal state of a PageContext, releasing
 all internal references, and preparing the PageContext for potential
 reuse by a later invocation of initialize(). This method is typically
 called from JspFactory.releasePageContext().

 <p>
 Subclasses shall envelope this method.

 <p>
 This method should not be used by page  or tag library authors.</DL>
<HR>

<A NAME="setAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>
setAttribute</H3>
<PRE>
public abstract void <B>setAttribute</B>(java.lang.String&nbsp;name,
                                  java.lang.Object&nbsp;attribute)</PRE>
<DL>
<DD>Register the name and object specified with page scope semantics.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the attribute to set<DD><CODE>attribute</CODE> - the object to associate with the name<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if the name or object is null</DL>
</DD>
</DL>
<HR>

<A NAME="setAttribute(java.lang.String, java.lang.Object, int)"><!-- --></A><H3>
setAttribute</H3>
<PRE>
public abstract void <B>setAttribute</B>(java.lang.String&nbsp;name,
                                  java.lang.Object&nbsp;o,
                                  int&nbsp;scope)</PRE>
<DL>
<DD>register the name and object specified with appropriate scope semantics<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the attribute to set<DD><CODE>o</CODE> - the object to associate with the name<DD><CODE>scope</CODE> - the scope with which to associate the name/object<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if the name or object is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the scope is invalid</DL>
</DD>
</DL>
<HR>

<A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>
getAttribute</H3>
<PRE>
public abstract java.lang.Object <B>getAttribute</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Return the object associated with the name in the page scope or null
 if not found.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the attribute to get<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if the name is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the scope is invalid</DL>
</DD>
</DL>
<HR>

<A NAME="getAttribute(java.lang.String, int)"><!-- --></A><H3>
getAttribute</H3>
<PRE>
public abstract java.lang.Object <B>getAttribute</B>(java.lang.String&nbsp;name,
                                              int&nbsp;scope)</PRE>
<DL>
<DD>Return the object associated with the name in the specified
 scope or null if not found.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the attribute to set<DD><CODE>scope</CODE> - the scope with which to associate the name/object<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if the name is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the scope is invalid</DL>
</DD>
</DL>
<HR>

<A NAME="findAttribute(java.lang.String)"><!-- --></A><H3>
findAttribute</H3>
<PRE>
public abstract java.lang.Object <B>findAttribute</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Searches for the named attribute in page, request, session (if valid),
 and application scope(s) in order and returns the value associated or
 null.<DD><DL>
<DT><B>Returns:</B><DD>the value associated or null</DL>
</DD>
</DL>
<HR>

<A NAME="removeAttribute(java.lang.String)"><!-- --></A><H3>
removeAttribute</H3>
<PRE>
public abstract void <B>removeAttribute</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Remove the object reference associated with the given name,
 look in all scopes in the scope order.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the object to remove.</DL>
</DD>
</DL>
<HR>

<A NAME="removeAttribute(java.lang.String, int)"><!-- --></A><H3>
removeAttribute</H3>
<PRE>
public abstract void <B>removeAttribute</B>(java.lang.String&nbsp;name,
                                     int&nbsp;scope)</PRE>
<DL>
<DD>Remove the object reference associated with the specified name
 in the given scope.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the object to remove.<DD><CODE>scope</CODE> - The scope where to look.</DL>
</DD>
</DL>
<HR>

<A NAME="getAttributesScope(java.lang.String)"><!-- --></A><H3>
getAttributesScope</H3>
<PRE>
public abstract int <B>getAttributesScope</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Get the scope where a given attribute is defined.<DD><DL>
<DT><B>Returns:</B><DD>the scope of the object associated with the name specified or 0</DL>
</DD>
</DL>
<HR>

<A NAME="getAttributeNamesInScope(int)"><!-- --></A><H3>
getAttributeNamesInScope</H3>
<PRE>
public abstract java.util.Enumeration <B>getAttributeNamesInScope</B>(int&nbsp;scope)</PRE>
<DL>
<DD>Enumerate all the attributes in a given scope<DD><DL>
<DT><B>Returns:</B><DD>an enumeration of names (java.lang.String) of all the attributes the specified scope</DL>
</DD>
</DL>
<HR>

<A NAME="getOut()"><!-- --></A><H3>
getOut</H3>
<PRE>

⌨️ 快捷键说明

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