Class MultipartRequestWrapper
- All Implemented Interfaces:
HttpServletRequest,ServletRequest
This class functions as a wrapper around HttpServletRequest to provide working getParameter methods for multipart requests.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe parameters for this multipart requestFields inherited from interface jakarta.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetParameter(String name) Attempts to get a parameter for this request.Combines the parameters stored here with those in the underlying request.Returns the names of the parameters for this request.String[]getParameterValues(String name) Returns the values of a parameter in this request.voidsetParameter(String name, String value) Sets a parameter for this request.Methods inherited from class jakarta.servlet.http.HttpServletRequestWrapper
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgradeMethods inherited from class jakarta.servlet.ServletRequestWrapper
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, startAsyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.ServletRequest
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
-
Field Details
-
parameters
The parameters for this multipart request
-
-
Constructor Details
-
MultipartRequestWrapper
-
-
Method Details
-
setParameter
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.
-
getParameter
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
- Specified by:
getParameterin interfaceServletRequest- Overrides:
getParameterin classServletRequestWrapper
-
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
- Specified by:
getParameterNamesin interfaceServletRequest- Overrides:
getParameterNamesin classServletRequestWrapper
-
getParameterValues
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.
- Specified by:
getParameterValuesin interfaceServletRequest- Overrides:
getParameterValuesin classServletRequestWrapper
-
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.
- Specified by:
getParameterMapin interfaceServletRequest- Overrides:
getParameterMapin classServletRequestWrapper
-