Deprecated
As of Java(tm) Servlet API 2.3. These methods were only useful with the default encoding and have been moved to the request interfaces.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static ResourceBundle |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static StringBuffer | Returns: aStringBuffer object containing
the reconstructed URLa req)HttpServletRequest object
containing the client's requestReconstructs the URL the client used to make the request,
using information in the |
| private static String | |
| public static Hashtable | Returns: aHashTable object built
from the parsed key-value pairsan integer specifying the length,
in characters, of the
len, ServletInputStream ServletInputStream
object that is also passed to this
methodthe in)ServletInputStream
object that contains the data sent
from the clientParses data from an HTML form that the client sends to the server using the HTTP POST method and the application/x-www-form-urlencoded MIME type. |
| public static Hashtable | Returns: aHashTable object built
from the parsed key-value pairsa string containing the query to be parsed s)Parses a query string passed from the client to the
server and builds a |
| LSTRING_FILE | back to summary |
|---|---|
| private static final String LSTRING_FILE | |
| lStrings | back to summary |
|---|---|
| private static ResourceBundle lStrings | |
| HttpUtils | back to summary |
|---|---|
| public HttpUtils() Constructs an empty | |
| getRequestURL | back to summary |
|---|---|
| public static StringBuffer getRequestURL(HttpServletRequest req) Reconstructs the URL the client used to make the request,
using information in the Because this method returns a This method is useful for creating redirect messages and for reporting errors.
| |
| parseName | back to summary |
|---|---|
| private static String parseName(String s, StringBuilder sb) | |
| parsePostData | back to summary |
|---|---|
| public static Hashtable Parses data from an HTML form that the client sends to the server using the HTTP POST method and the application/x-www-form-urlencoded MIME type. 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. 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 %xx) are converted to ASCII characters.
| |
| parseQueryString | back to summary |
|---|---|
| public static Hashtable Parses a query string passed from the client to the
server and builds a 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. 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 %xx) are converted to ASCII characters.
| |