Package webwork.multipart
Class MultiPartRequest
java.lang.Object
webwork.multipart.MultiPartRequest
- Direct Known Subclasses:
TempFileRemovingMultipartRequestWrapper
Multipart Form Data request.
This class decodes the multipart/form-data stream sent by a HTML form that uses a file input item.
- Version:
- $Id: MultiPartRequest.java,v 1.4 2003/05/08 00:28:12 fate Exp $
- Author:
- Matt Baldree (matt@smallleap.com) modified for WW's use, Hani Suleiman - Added javadocs
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Deletes all the temporary files; Intentionally not abstract to preserve backwards compatibility Not abstract to preserve backwards compatibility.abstract StringgetContentType(String name) abstract FileGet the File as saved by the multipart parser on the server filesystem.abstract Enumerationabstract StringgetFilesystemName(String name) Get the client file name of the specified uploaded file.abstract StringgetParameter(String name) abstract Enumerationabstract String[]getParameterValues(String name) static booleanisMultiPart(jakarta.servlet.http.HttpServletRequest request) Is request a multipart request
-
Field Details
-
log
protected static org.apache.commons.logging.Log log
-
-
Constructor Details
-
MultiPartRequest
public MultiPartRequest()
-
-
Method Details
-
isMultiPart
public static boolean isMultiPart(jakarta.servlet.http.HttpServletRequest request) Is request a multipart request -
getParameterNames
-
getParameter
-
getParameterValues
-
getFileNames
-
getFilesystemName
Get the client file name of the specified uploaded file.- Parameters:
name- the parameter name of the uploaded file- Returns:
- The client filename
-
getContentType
-
getFile
Get the File as saved by the multipart parser on the server filesystem.- Parameters:
name- The parameter name of the uploaded file- Returns:
- the File on the local filesystem, or null if the multipart parser has not stored the file on disk (for example, if it is a memory based file upload)
-
cleanup
public void cleanup()Deletes all the temporary files; Intentionally not abstract to preserve backwards compatibility Not abstract to preserve backwards compatibility. Please override in subclass if you want to support the cleanup after request.
-