# Package org.apache.tomcat.util.http.fileupload.servlet

package org.apache.tomcat.util.http.fileupload.servlet

An implementation of `FileUpload` for use in servlets conforming to JSR 53. This implementation requires only access to the servlet's current `HttpServletRequest` instance, and a suitable `FileItemFactory` implementation, such as `DiskFileItemFactory`.

The following code fragment demonstrates typical usage.

            DiskFileItemFactory factory = new DiskFileItemFactory();
            // Configure the factory here, if desired.
            ServletFileUpload upload = new ServletFileUpload(factory);
            // Configure the uploader here, if desired.
            List fileItems = upload.parseRequest(request);

Please see the FileUpload User Guide for further details and examples of how to use this package.

- Related Packages
  Package
  Description
  org.apache.tomcat.util.http.fileupload
  NOTE: This code has been copied from commons-fileupload trunk 1.3 and commons-io 1.4 and package renamed to avoid clashes with any web apps that may wish to use these libraries.
  org.apache.tomcat.util.http.fileupload.disk
  A disk-based implementation of the `FileItem` interface.
  org.apache.tomcat.util.http.fileupload.impl
  Implementations and exceptions utils.
  org.apache.tomcat.util.http.fileupload.util
  This package contains various IO related utility classes or methods, which are basically reusable and not necessarily restricted to the scope of a file upload.
- Classes
  Class
  Description
  ServletFileUpload
  High level API for processing file uploads.
  ServletRequestContext
  Provides access to the request information needed for a request made to an HTTP servlet.