public class RequestMultipartWrapper
extends javax.servlet.http.HttpServletRequestWrapper
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,org.apache.commons.fileupload.FileItem> |
requestFiles
Map of parameters which are uploaded files *
|
protected Map<String,List<String>> |
requestParameters
Map of regular parameters and their values
|
protected Map<String,File> |
uploadedFiles
Map of uploaded files
|
| Constructor and Description |
|---|
RequestMultipartWrapper(javax.servlet.http.HttpServletRequest request,
String saveDirectory,
int maxPostSize,
String encoding)
Constructs a new MultipartRequest to handle the specified request,
saving any uploaded files to the given directory, and limiting the
upload size to the specified length.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFormField(org.apache.commons.fileupload.FileItem item)
Adds a new regular field to the list of parameters
|
protected void |
addUploadedFile(org.apache.commons.fileupload.FileItem item)
Adds a file field to the list of parameters
|
Enumeration |
getFileParameterNames()
Returns the parameter names on the MultipartRequest that are of type file
|
String |
getParameter(String name)
Returns the value for the given parameter name
|
Map |
getParameterMap()
Returns a Map containing all the parameters on the MultipartRequest
|
Enumeration |
getParameterNames()
Returns the parameter names on the MultipartRequest
|
String[] |
getParameterValues(String name)
Returns the values for the given parameter name
|
File |
getUploadedFile(String parameter)
Returns the uploaded file for a given parameter, or null it not found
|
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, upgradegetAsyncContext, 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, startAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAsyncContext, 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, startAsyncprotected Map<String,org.apache.commons.fileupload.FileItem> requestFiles
protected Map<String,List<String>> requestParameters
public RequestMultipartWrapper(javax.servlet.http.HttpServletRequest request,
String saveDirectory,
int maxPostSize,
String encoding)
throws IOException
request - the servlet request.saveDirectory - the directory in which to save any uploaded files.maxPostSize - the maximum size of the POST content.IOException - if the uploaded content is larger than
maxPostSize or there's a problem reading or parsing the request.protected void addFormField(org.apache.commons.fileupload.FileItem item)
throws IOException
item - IOExceptionprotected void addUploadedFile(org.apache.commons.fileupload.FileItem item)
throws Exception
item - Exceptionpublic Enumeration getParameterNames()
getParameterNames in interface javax.servlet.ServletRequestgetParameterNames in class javax.servlet.ServletRequestWrapperpublic String getParameter(String name)
getParameter in interface javax.servlet.ServletRequestgetParameter in class javax.servlet.ServletRequestWrappername - the parameter namepublic String[] getParameterValues(String name)
getParameterValues in interface javax.servlet.ServletRequestgetParameterValues in class javax.servlet.ServletRequestWrappername - the parameter namepublic Map getParameterMap()
getParameterMap in interface javax.servlet.ServletRequestgetParameterMap in class javax.servlet.ServletRequestWrapperpublic Enumeration getFileParameterNames()
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.