|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.ServletRequestWrapper javax.servlet.http.HttpServletRequestWrapper org.apache.struts.upload.MultipartRequestWrapper
public class MultipartRequestWrapper
This class functions as a wrapper around HttpServletRequest to provide working getParameter methods for multipart requests.
Field Summary | |
---|---|
protected Map |
parameters
The parameters for this multipart request |
Fields inherited from interface javax.servlet.http.HttpServletRequest |
---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
Constructor Summary | |
---|---|
MultipartRequestWrapper(HttpServletRequest request)
|
Method Summary | |
---|---|
String |
getParameter(String name)
Attempts to get a parameter for this request. |
Map |
getParameterMap()
Combines the parameters stored here with those in the underlying request. |
Enumeration |
getParameterNames()
Returns the names of the parameters for this request. |
String[] |
getParameterValues(String name)
Returns the values of a parameter in this request. |
void |
setParameter(String name,
String value)
Sets a parameter for this request. |
Methods inherited from class javax.servlet.ServletRequestWrapper |
---|
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.ServletRequest |
---|
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding |
Field Detail |
---|
protected Map parameters
The parameters for this multipart request
Constructor Detail |
---|
public MultipartRequestWrapper(HttpServletRequest request)
Method Detail |
---|
public void setParameter(String name, String value)
Sets a parameter for this request. The parameter is actually separate from the request parameters, but calling on the getParameter() methods of this class will work as if they weren't.
public String getParameter(String name)
Attempts to get a parameter for this request. It first looks in the underlying HttpServletRequest object for the parameter, and if that doesn't exist it looks for the parameters retrieved from the multipart request
getParameter
in interface ServletRequest
getParameter
in class ServletRequestWrapper
public Enumeration getParameterNames()
Returns the names of the parameters for this request. The enumeration consists of the normal request parameter names plus the parameters read from the multipart request
getParameterNames
in interface ServletRequest
getParameterNames
in class ServletRequestWrapper
public String[] getParameterValues(String name)
Returns the values of a parameter in this request. It first looks in the underlying HttpServletRequest object for the parameter, and if that doesn't exist it looks for the parameter retrieved from the multipart request.
getParameterValues
in interface ServletRequest
getParameterValues
in class ServletRequestWrapper
public Map getParameterMap()
Combines the parameters stored here with those in the underlying request. If paramater values in the underlying request take precedence over those stored here.
getParameterMap
in interface ServletRequest
getParameterMap
in class ServletRequestWrapper
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |