org.apache.struts.upload
Class DiskMultipartRequestHandler
java.lang.Object
org.apache.struts.upload.DiskMultipartRequestHandler
- MultipartRequestHandler
public class DiskMultipartRequestHandler
extends java.lang.Object
This is a MultipartRequestHandler that writes file data directly to
to temporary files on disk.
protected Hashtable | allElements - A Hashtable representing all elemnents.
|
protected Hashtable | fileElements - A Hashtable representing the form files uploaded.
|
protected static Log | log - Commons Logging instance.
|
protected ActionMapping | mapping - The ActionMapping instance used for this class.
|
protected ActionServlet | servlet - The ActionServlet instance used for this class.
|
protected String | tempDir - The temporary directory.
|
protected Hashtable | textElements - A Hashtable representing the form text input names and values.
|
allElements
protected Hashtable allElements
A Hashtable representing all elemnents.
fileElements
protected Hashtable fileElements
A Hashtable representing the form files uploaded.
log
protected static Log log
Commons Logging instance.
mapping
protected ActionMapping mapping
The ActionMapping instance used for this class.
servlet
protected ActionServlet servlet
The ActionServlet instance used for this class.
tempDir
protected String tempDir
The temporary directory.
textElements
protected Hashtable textElements
A Hashtable representing the form text input names and values.
createTextElement
protected void createTextElement(HttpServletRequest request,
MultipartElement element)
getAllElements
public Hashtable getAllElements()
This method returns all elements of a multipart request.
- getAllElements in interface MultipartRequestHandler
- A Hashtable where the keys are input names and values
are either Strings or FormFiles
getFileElements
public Hashtable getFileElements()
This method is called on to retrieve all the FormFile
input elements of the request.
- getFileElements in interface MultipartRequestHandler
- A Hashtable where the keys are the input names of the
files and the values are FormFile objects
getMaxSize
protected long getMaxSize(String stringSize)
throws ServletException
Gets the maximum post data size in bytes from the string
representation in the configuration file.
getTextElements
public Hashtable getTextElements()
This method is called on to retrieve all the text
input elements of the request.
- getTextElements in interface MultipartRequestHandler
- A Hashtable where the keys and values are the names and
values of the request input parameters
handleRequest
public void handleRequest(HttpServletRequest request)
throws ServletException
This method populates the internal hashtables with multipart request data.
If the request argument is an instance of MultipartRequestWrapper,
the request wrapper will be populated as well.
- handleRequest in interface MultipartRequestHandler
retrieveTempDir
protected void retrieveTempDir(ModuleConfig moduleConfig)
Retrieves the temporary directory from either ActionServlet, a context
property, or a system property, in that order.
Copyright B) 2000-2007 - The Apache Software Foundation