📄 httputils.html
字号:
</TR>
</TABLE>
<A NAME="HttpUtils()"><!-- --></A><H3>
HttpUtils</H3>
<PRE>
public <B>HttpUtils</B>()</PRE>
<DL>
<DD><B>Deprecated.</B> <DD>Constructs an empty <code>HttpUtils</code> object.
<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="parseQueryString(java.lang.String)"><!-- --></A><H3>
parseQueryString</H3>
<PRE>
public static java.util.Hashtable <B>parseQueryString</B>(java.lang.String s)</PRE>
<DL>
<DD><B>Deprecated.</B> <DD>Parses a query string passed from the client to the
server and builds a <code>HashTable</code> object
with key-value pairs.
The query string should be in the form of a string
packaged by the GET or POST method, that is, it
should have key-value pairs in the form <i>key=value</i>,
with each pair separated from the next by a & character.
<p>A key can appear more than once in the query string
with different values. However, the key appears only once in
the hashtable, with its value being
an array of strings containing the multiple values sent
by the query string.
<p>The keys and values in the hashtable are stored in their
decoded form, so
any + characters are converted to spaces, and characters
sent in hexadecimal notation (like <i>%xx</i>) are
converted to ASCII characters.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - a string containing the query to be parsed
<DT><B>Returns:</B><DD>a <code>HashTable</code> object built
from the parsed key-value pairs
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the query string
is invalid</DL>
</DD>
</DL>
<HR>
<A NAME="parsePostData(int, javax.servlet.ServletInputStream)"><!-- --></A><H3>
parsePostData</H3>
<PRE>
public static java.util.Hashtable <B>parsePostData</B>(int len,
<A HREF="../../../javax/servlet/ServletInputStream.html" title="class in javax.servlet">ServletInputStream</A> in)</PRE>
<DL>
<DD><B>Deprecated.</B> <DD>Parses data from an HTML form that the client sends to
the server using the HTTP POST method and the
<i>application/x-www-form-urlencoded</i> MIME type.
<p>The data sent by the POST method contains key-value
pairs. A key can appear more than once in the POST data
with different values. However, the key appears only once in
the hashtable, with its value being
an array of strings containing the multiple values sent
by the POST method.
<p>The keys and values in the hashtable are stored in their
decoded form, so
any + characters are converted to spaces, and characters
sent in hexadecimal notation (like <i>%xx</i>) are
converted to ASCII characters.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>len</CODE> - an integer specifying the length,
in characters, of the
<code>ServletInputStream</code>
object that is also passed to this
method<DD><CODE>in</CODE> - the <code>ServletInputStream</code>
object that contains the data sent
from the client
<DT><B>Returns:</B><DD>a <code>HashTable</code> object built
from the parsed key-value pairs
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the data
sent by the POST method is invalid</DL>
</DD>
</DL>
<HR>
<A NAME="getRequestURL(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>
getRequestURL</H3>
<PRE>
public static java.lang.StringBuffer <B>getRequestURL</B>(<A HREF="../../../javax/servlet/http/HttpServletRequest.html" title="interface in javax.servlet.http">HttpServletRequest</A> req)</PRE>
<DL>
<DD><B>Deprecated.</B> <DD>Reconstructs the URL the client used to make the request,
using information in the <code>HttpServletRequest</code> object.
The returned URL contains a protocol, server name, port
number, and server path, but it does not include query
string parameters.
<p>Because this method returns a <code>StringBuffer</code>,
not a string, you can modify the URL easily, for example,
to append query parameters.
<p>This method is useful for creating redirect messages
and for reporting errors.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>req</CODE> - a <code>HttpServletRequest</code> object
containing the client's request
<DT><B>Returns:</B><DD>a <code>StringBuffer</code> object containing
the reconstructed URL</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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/HttpUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/servlet/http/HttpSessionEvent.html" title="class in javax.servlet.http"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="HttpUtils.html" target="_top"><B>NO FRAMES</B></A>
<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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -