|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.servlet.MultipartRequest
public abstract class MultipartRequest
A wrapper of HttpServletRequest with additional methods to handle files and adding and removing parameters. Note that the createInstnace method must be called before any method of the original SerlvetRequest is called.
| Field Summary |
|---|
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
|---|---|
MultipartRequest()
|
|
| Method Summary | |
|---|---|
abstract void |
addParameter(String name,
String value)
Add a parameter to the parameter list. |
static MultipartRequest |
createInstance(HttpServletRequest req)
Crete the MultipartRequest from the ServletRequest. |
abstract Cookie |
getCookie(String id)
Get cookie from id (don't iterate the array) |
abstract File |
getFile(String name)
Return the locally stored temporary file associated with the parameter name given as argument. |
abstract Enumeration |
getFileNames()
Return the name of the parameters containing files as values. |
abstract Hashtable |
getFiles()
Deprecated. |
abstract String |
getParamsAsLink()
This method builds a parameter string suitable for a GET request out of the parameter map. |
abstract String |
getRemoteFileName(String name)
Return the remote file name of the file associated with the parameter name given as argument. |
abstract void |
removeParameter(String name)
Removes a parameter from the parameter list. |
abstract void |
setPathInfo(String path)
Sets the path info. |
abstract void |
setQueryString(String params,
boolean removeParams)
Sets the paramters from a query-string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.http.HttpServletRequest |
|---|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole |
| Methods inherited from interface javax.servlet.ServletRequest |
|---|
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding |
| Constructor Detail |
|---|
public MultipartRequest()
| Method Detail |
|---|
public static MultipartRequest createInstance(HttpServletRequest req)
req - the original requestpublic abstract Enumeration getFileNames()
public abstract File getFile(String name)
name - the name of the parameterpublic abstract String getRemoteFileName(String name)
name - the name of the parameter
public abstract void addParameter(String name,
String value)
name - the name of the parametervalue - the value of the parameterpublic abstract void removeParameter(String name)
name - the name of the parameterpublic abstract void setPathInfo(String path)
path - the new path info
public abstract void setQueryString(String params,
boolean removeParams)
params - the params in HTTP-GET syntax: param1=value1¶m2=value2removeParams - if true for each parameter of the query string already existing values are removed.public abstract Cookie getCookie(String id)
public abstract String getParamsAsLink()
throws UnsupportedEncodingException
UnsupportedEncodingException@Deprecated public abstract Hashtable getFiles()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||