Class MultiPartRequest

java.lang.Object
webwork.multipart.MultiPartRequest
Direct Known Subclasses:
TempFileRemovingMultipartRequestWrapper

public abstract class MultiPartRequest extends Object
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 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

      public abstract Enumeration getParameterNames()
    • getParameter

      public abstract String getParameter(String name)
    • getParameterValues

      public abstract String[] getParameterValues(String name)
    • getFileNames

      public abstract Enumeration getFileNames()
    • getFilesystemName

      public abstract String getFilesystemName(String name)
      Get the client file name of the specified uploaded file.
      Parameters:
      name - the parameter name of the uploaded file
      Returns:
      The client filename
    • getContentType

      public abstract String getContentType(String name)
    • getFile

      public abstract File getFile(String name)
      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.