|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.dispatcher.multipart.MultiPartRequest
org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest
public class JakartaMultiPartRequest
Multipart form data request adapter for Jakarta Commons Fileupload package.
Field Summary |
---|
Fields inherited from class org.apache.struts2.dispatcher.multipart.MultiPartRequest |
---|
log |
Constructor Summary | |
---|---|
JakartaMultiPartRequest(javax.servlet.http.HttpServletRequest servletRequest,
java.lang.String saveDir,
int maxSize)
Creates a new request wrapper to handle multi-part data using methods adapted from Jason Pell's multipart classes (see class description). |
Method Summary | |
---|---|
java.lang.String[] |
getContentType(java.lang.String fieldName)
Returns the content type(s) of the file(s) associated with the specified field name (as supplied by the client browser), or null if no files are associated with the given field name. |
java.util.List |
getErrors()
Returns a list of error messages that may have occurred while processing the request. |
java.io.File[] |
getFile(java.lang.String fieldName)
Returns a File object for the filename specified or null if no files
are associated with the given field name. |
java.lang.String[] |
getFileNames(java.lang.String fieldName)
Returns a String[] of file names for files associated with the specified input field name |
java.util.Enumeration<java.lang.String> |
getFileParameterNames()
Returns an enumeration of the parameter names for uploaded files |
java.lang.String[] |
getFilesystemName(java.lang.String fieldName)
Returns the file system name(s) of files associated with the given field name or null if no files are associated with the given field name. |
java.lang.String |
getParameter(java.lang.String name)
Returns the specified request parameter. |
java.util.Enumeration<java.lang.String> |
getParameterNames()
Returns an enumeration of String parameter names. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns a list of all parameter values associated with a parameter name. |
Methods inherited from class org.apache.struts2.dispatcher.multipart.MultiPartRequest |
---|
isMultiPart |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JakartaMultiPartRequest(javax.servlet.http.HttpServletRequest servletRequest, java.lang.String saveDir, int maxSize) throws java.io.IOException
maxSize
- maximum size post allowedsaveDir
- the directory to save off the fileservletRequest
- the request containing the multipart
java.io.IOException
- is thrown if encoding fails.Method Detail |
---|
public java.util.Enumeration<java.lang.String> getFileParameterNames()
MultiPartRequest
getFileParameterNames
in class MultiPartRequest
public java.lang.String[] getContentType(java.lang.String fieldName)
MultiPartRequest
getContentType
in class MultiPartRequest
fieldName
- input field name
public java.io.File[] getFile(java.lang.String fieldName)
MultiPartRequest
File
object for the filename specified or null if no files
are associated with the given field name.
getFile
in class MultiPartRequest
fieldName
- input field name
public java.lang.String[] getFileNames(java.lang.String fieldName)
MultiPartRequest
getFileNames
in class MultiPartRequest
fieldName
- input field name
public java.lang.String[] getFilesystemName(java.lang.String fieldName)
MultiPartRequest
getFilesystemName
in class MultiPartRequest
fieldName
- input field name
public java.lang.String getParameter(java.lang.String name)
MultiPartRequest
getParameter
in class MultiPartRequest
name
- the name of the parameter to get
public java.util.Enumeration<java.lang.String> getParameterNames()
MultiPartRequest
getParameterNames
in class MultiPartRequest
public java.lang.String[] getParameterValues(java.lang.String name)
MultiPartRequest
getParameterValues
in class MultiPartRequest
name
- the name of the parameter.
public java.util.List getErrors()
MultiPartRequest
MultiPartRequestWrapper
's errors field.
getErrors
in class MultiPartRequest
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |