servletrequestwrapper.html

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

HTML
916
字号
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/servlet/ServletRequestWrapper.html#getServerPort()">getServerPort</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default behavior of this method is to return getServerPort()
 on the wrapped request object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/servlet/ServletRequestWrapper.html#isSecure()">isSecure</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default behavior of this method is to return isSecure()
 on the wrapped request object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/servlet/ServletRequestWrapper.html#removeAttribute(java.lang.String)">removeAttribute</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default behavior of this method is to call removeAttribute(String name)
 on the wrapped request object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/servlet/ServletRequestWrapper.html#setAttribute(java.lang.String, java.lang.Object)">setAttribute</A></B>(java.lang.String&nbsp;name,
             java.lang.Object&nbsp;o)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default behavior of this method is to return setAttribute(String name, Object o)
 on the wrapped request object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/servlet/ServletRequestWrapper.html#setCharacterEncoding(java.lang.String)">setCharacterEncoding</A></B>(java.lang.String&nbsp;enc)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default behavior of this method is to set the character encoding
 on the wrapped request object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/servlet/ServletRequestWrapper.html#setRequest(javax.servlet.ServletRequest)">setRequest</A></B>(<A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A>&nbsp;request)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the request object being wrapped.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= 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="ServletRequestWrapper(javax.servlet.ServletRequest)"><!-- --></A><H3>
ServletRequestWrapper</H3>
<PRE>
public <B>ServletRequestWrapper</B>(<A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A>&nbsp;request)</PRE>
<DL>
<DD>Creates a ServletRequest adaptor wrapping the given request object.<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the request is null</DL>
</DD>
</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="getRequest()"><!-- --></A><H3>
getRequest</H3>
<PRE>
public <A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A> <B>getRequest</B>()</PRE>
<DL>
<DD>Return the wrapped request object.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setRequest(javax.servlet.ServletRequest)"><!-- --></A><H3>
setRequest</H3>
<PRE>
public void <B>setRequest</B>(<A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A>&nbsp;request)</PRE>
<DL>
<DD>Sets the request object being wrapped.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the request is null.</DL>
</DD>
</DL>
<HR>

<A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>
getAttribute</H3>
<PRE>
public java.lang.Object <B>getAttribute</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>The default behavior of this method is to call getAttribute(String name)
 on the wrapped request object.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/servlet/ServletRequest.html#getAttribute(java.lang.String)">getAttribute</A></CODE> in interface <CODE><A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.servlet.ServletRequest</CODE></DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> specifying the name of 
			the attribute<DT><B>Returns:</B><DD>an <code>Object</code> containing the value 
			of the attribute, or <code>null</code> if
			the attribute does not exist</DL>
</DD>
</DL>
<HR>

<A NAME="getAttributeNames()"><!-- --></A><H3>
getAttributeNames</H3>
<PRE>
public java.util.Enumeration <B>getAttributeNames</B>()</PRE>
<DL>
<DD>The default behavior of this method is to return getAttributeNames()
 on the wrapped request object.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/servlet/ServletRequest.html#getAttributeNames()">getAttributeNames</A></CODE> in interface <CODE><A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.servlet.ServletRequest</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>an <code>Enumeration</code> of strings 
			containing the names 
 			of the request's attributes</DL>
</DD>
</DL>
<HR>

<A NAME="getCharacterEncoding()"><!-- --></A><H3>
getCharacterEncoding</H3>
<PRE>
public java.lang.String <B>getCharacterEncoding</B>()</PRE>
<DL>
<DD>The default behavior of this method is to return getCharacterEncoding()
 on the wrapped request object.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/servlet/ServletRequest.html#getCharacterEncoding()">getCharacterEncoding</A></CODE> in interface <CODE><A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.servlet.ServletRequest</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>a <code>String</code> containing the name of 
			the chararacter encoding, or <code>null</code>
			if the request does not specify a character encoding</DL>
</DD>
</DL>
<HR>

<A NAME="setCharacterEncoding(java.lang.String)"><!-- --></A><H3>
setCharacterEncoding</H3>
<PRE>
public void <B>setCharacterEncoding</B>(java.lang.String&nbsp;enc)
                          throws java.io.UnsupportedEncodingException</PRE>
<DL>
<DD>The default behavior of this method is to set the character encoding
 on the wrapped request object.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/servlet/ServletRequest.html#setCharacterEncoding(java.lang.String)">setCharacterEncoding</A></CODE> in interface <CODE><A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.servlet.ServletRequest</CODE></DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>a</CODE> - <code>String</code> containing the name of 
			the chararacter encoding.<DT><B>Throws:</B><DD><CODE>java.io.UnsupportedEncodingException</CODE> - if this is not a valid encoding</DL>
</DD>
</DL>
<HR>

<A NAME="getContentLength()"><!-- --></A><H3>
getContentLength</H3>
<PRE>
public int <B>getContentLength</B>()</PRE>
<DL>
<DD>The default behavior of this method is to return getContentLength()
 on the wrapped request object.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/servlet/ServletRequest.html#getContentLength()">getContentLength</A></CODE> in interface <CODE><A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.servlet.ServletRequest</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>an integer containing the length of the 
 			request body or -1 if the length is not known</DL>
</DD>
</DL>
<HR>

<A NAME="getContentType()"><!-- --></A><H3>
getContentType</H3>
<PRE>
public java.lang.String <B>getContentType</B>()</PRE>
<DL>
<DD>The default behavior of this method is to return getContentType()
 on the wrapped request object.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/servlet/ServletRequest.html#getContentType()">getContentType</A></CODE> in interface <CODE><A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.servlet.ServletRequest</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>a <code>String</code> containing the name 
			of the MIME type of 
 			the request, or null if the type is not known</DL>
</DD>
</DL>
<HR>

<A NAME="getInputStream()"><!-- --></A><H3>
getInputStream</H3>
<PRE>
public <A HREF="../../javax/servlet/ServletInputStream.html">ServletInputStream</A> <B>getInputStream</B>()
                                  throws java.io.IOException</PRE>
<DL>
<DD>The default behavior of this method is to return getInputStream()
 on the wrapped request object.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/servlet/ServletRequest.html#getInputStream()">getInputStream</A></CODE> in interface <CODE><A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.servlet.ServletRequest</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>a <A HREF="../../javax/servlet/ServletInputStream.html"><CODE>ServletInputStream</CODE></A> object containing
 				the body of the request<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if the <A HREF="../../javax/servlet/ServletRequest.html#getReader()"><CODE>ServletRequest.getReader()</CODE></A> method
 					 has already been called for this request<DD><CODE>java.io.IOException</CODE> - if an input or output exception occurred</DL>
</DD>
</DL>
<HR>

<A NAME="getParameter(java.lang.String)"><!-- --></A><H3>
getParameter</H3>
<PRE>
public java.lang.String <B>getParameter</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>The default behavior of this method is to return getParameter(String name)
 on the wrapped request object.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/servlet/ServletRequest.html#getParameter(java.lang.String)">getParameter</A></CODE> in interface <CODE><A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.servlet.ServletRequest</CODE></DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a <code>String</code> specifying the 
			name of the parameter<DT><B>Returns:</B><DD>a <code>String</code> representing the 
			single value of the parameter<DT><B>See Also: </B><DD><A HREF="../../javax/servlet/ServletRequest.html#getParameterValues(java.lang.String)"><CODE>ServletRequest.getParameterValues(java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getParameterMap()"><!-- --></A><H3>
getParameterMap</H3>
<PRE>
public java.util.Map <B>getParameterMap</B>()</PRE>
<DL>
<DD>The default behavior of this method is to return getParameterMap()
 on the wrapped request object.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/servlet/ServletRequest.html#getParameterMap()">getParameterMap</A></CODE> in interface <CODE><A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.servlet.ServletRequest</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>an immutable java.util.Map containing parameter names as 
 keys and parameter values as map values. The keys in the parameter
 map are of type String. The values in the parameter map are of type
 String array.</DL>
</DD>
</DL>
<HR>

<A NAME="getParameterNames()"><!-- --></A><H3>
getParameterNames</H3>
<PRE>
public java.util.Enumeration <B>getParameterNames</B>()</PRE>
<DL>
<DD>The default behavior of this method is to return getParameterNames()
 on the wrapped request object.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/servlet/ServletRequest.html#getParameterNames()">getParameterNames</A></CODE> in interface <CODE><A HREF="../../javax/servlet/ServletRequest.html">ServletRequest</A></CODE></DL>
</DD>
<DD>Following copied from interface: <CODE>javax.servlet.ServletRequest</CODE></DD>
<DD><DL>
<DT><B>Returns:</B><DD>an <code>Enumeration</code> of <code>String</code>
			objects, each <code>String</code> containing
 			the name of a request parameter; or an 
			empty <code>Enumeration</code> if the
			request has no parameters</DL>
</DD>
</DL>
<HR>

⌨️ 快捷键说明

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