|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.http.HttpUtils
A collection of static utility methods useful to HTTP servlets.
Constructor Summary | |
HttpUtils()
Creates an empty HttpUtils object. |
Method Summary | |
static java.lang.StringBuffer |
getRequestURL(HttpServletRequest req)
Reconstructs the URL used by the client used to make the request. |
static java.util.Hashtable |
parsePostData(int len,
ServletInputStream in)
Parses FORM data that is posted to the server using the HTTP POST method and the application/x-www-form-urlencoded mime type. |
static java.util.Hashtable |
parseQueryString(java.lang.String s)
Parses a query string and builds a hashtable of key-value pairs, where the values are arrays of strings. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public HttpUtils()
Method Detail |
public static java.util.Hashtable parseQueryString(java.lang.String s)
A key can appear one or more times in the query string. Each time a key appears, its corresponding value is inserted into its string array in the hash table. (So keys that appear once in the query string have, in the hash table, a string array of length one as their value, keys that appear twice have a string array of length two, etc.)
When the keys and values are moved into the hashtable, any plus signs (+) are returned to spaces and characters sent in hexadecimal notation (%xx) are converted back to characters.
s
- query string to be parsedpublic static java.util.Hashtable parsePostData(int len, ServletInputStream in)
len
- the length of the data in the input stream.in
- the input streampublic static java.lang.StringBuffer getRequestURL(HttpServletRequest req)
This method is useful for creating redirect messages and for reporting errors.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |