public class MultipartRequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
This class functions as a wrapper around HttpServletRequest to provide working getParameter methods for multipart requests.
Modifier and Type | Field and Description |
---|---|
protected Map |
parameters
The parameters for this multipart request
|
Constructor and Description |
---|
MultipartRequestWrapper(javax.servlet.http.HttpServletRequest request) |
Modifier and Type | Method and Description |
---|---|
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.
|
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout, upgrade
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
protected Map parameters
The parameters for this multipart request
public MultipartRequestWrapper(javax.servlet.http.HttpServletRequest request)
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 javax.servlet.ServletRequest
getParameter
in class javax.servlet.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 javax.servlet.ServletRequest
getParameterNames
in class javax.servlet.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 javax.servlet.ServletRequest
getParameterValues
in class javax.servlet.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 javax.servlet.ServletRequest
getParameterMap
in class javax.servlet.ServletRequestWrapper
Copyright © 2000–2017 Apache Software Foundation. All rights reserved.