📄 jspcontext.html
字号:
</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../../javax/servlet/jsp/JspWriter.html" title="class in javax.servlet.jsp">JspWriter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/jsp/JspContext.html#getOut()">getOut</A></B>()</CODE><BR> The current value of the out object (a JspWriter).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../../javax/servlet/jsp/el/VariableResolver.html" title="interface in javax.servlet.jsp.el">VariableResolver</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/jsp/JspContext.html#getVariableResolver()">getVariableResolver</A></B>()</CODE><BR> Returns an instance of a VariableResolver that provides access to the implicit objects specified in the JSP specification using this JspContext as the context object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/servlet/jsp/JspWriter.html" title="class in javax.servlet.jsp">JspWriter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/jsp/JspContext.html#popBody()">popBody</A></B>()</CODE><BR> 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 JspContext.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/servlet/jsp/JspWriter.html" title="class in javax.servlet.jsp">JspWriter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/jsp/JspContext.html#pushBody(java.io.Writer)">pushBody</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A> writer)</CODE><BR> Return a new JspWriter object that sends output to the provided Writer. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/jsp/JspContext.html#removeAttribute(java.lang.String)">removeAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE><BR> Remove the object reference associated with the given name from all scopes. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/jsp/JspContext.html#removeAttribute(java.lang.String, int)">removeAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, int scope)</CODE><BR> Remove the object reference associated with the specified name in the given scope. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/jsp/JspContext.html#setAttribute(java.lang.String, java.lang.Object)">setAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</CODE><BR> Register the name and value specified with page scope semantics. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/servlet/jsp/JspContext.html#setAttribute(java.lang.String, java.lang.Object, int)">setAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value, int scope)</CODE><BR> Register the name and value specified with appropriate scope semantics. </TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="JspContext()"><!-- --></A><H3>JspContext</H3><PRE>public <B>JspContext</B>()</PRE><DL><DD>Sole constructor. (For invocation by subclass constructors, typically implicit.)<P></DL><!-- ============ 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="setAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>setAttribute</H3><PRE>public abstract void <B>setAttribute</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</PRE><DL><DD>Register the name and value specified with page scope semantics. If the value passed in is <code>null</code>, this has the same effect as calling <code>removeAttribute( name, PageContext.PAGE_SCOPE )</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the attribute to set<DD><CODE>value</CODE> - the value to associate with the name, or null if the attribute is to be removed from the page scope.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the name 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>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value, int scope)</PRE><DL><DD>Register the name and value specified with appropriate scope semantics. If the value passed in is <code>null</code>, this has the same effect as calling <code>removeAttribute( name, scope )</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the attribute to set<DD><CODE>value</CODE> - the object to associate with the name, or null if the attribute is to be removed from the specified scope.<DD><CODE>scope</CODE> - the scope with which to associate the name/object<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the name is null<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the scope is invalid<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the scope is PageContext.SESSION_SCOPE but the page that was requested does not participate in a session or the session has been invalidated.</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getAttribute</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE><DL><DD>Returns the object associated with the name in the page scope or null if not found.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the attribute to get<DT><B>Returns:</B><DD>the object associated with the name in the page scope or null if not found.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the name is null</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String, int)"><!-- --></A><H3>getAttribute</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getAttribute</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, int scope)</PRE><DL><DD>Return the object associated with the name in the specified scope or null if not found.<P><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>Returns:</B><DD>the object associated with the name in the specified scope or null if not found.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the name is null<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the scope is invalid<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the scope is PageContext.SESSION_SCOPE but the page that was requested does not participate in a session or the session has been invalidated.</DL></DD></DL><HR><A NAME="findAttribute(java.lang.String)"><!-- --></A><H3>findAttribute</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>findAttribute</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> 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.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the attribute to search for<DT><B>Returns:</B><DD>the value associated or null<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the name is null</DL></DD></DL><HR><A NAME="removeAttribute(java.lang.String)"><!-- --></A><H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -