Class MultipartUploadFilter

java.lang.Object
org.glassfish.grizzly.servlet.extras.MultipartUploadFilter
All Implemented Interfaces:
javax.servlet.Filter

public class MultipartUploadFilter extends Object implements javax.servlet.Filter

A Filter implementation that leverages the non-blocking multipart processing API.

NOTE: this filter is implementation specific and will not function properly outside of the Grizzly 2.x Servlet implementation.

Since:
2.2
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Filter initialization parameter name to control whether or not the temp files used to store the uploaded file bytes will be deleted after the request ends.
    static final String
    The name of the request attribute with which an array of all Files (java.io.File[]) that were uploaded will be stored.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain)
     
    void
    init(javax.servlet.FilterConfig filterConfig)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DELETE_ON_REQUEST_END

      public static final String DELETE_ON_REQUEST_END
      Filter initialization parameter name to control whether or not the temp files used to store the uploaded file bytes will be deleted after the request ends. If this parameter is omitted, it will be assumed that the files will be deleted after request end.
      See Also:
    • UPLOADED_FILES

      public static final String UPLOADED_FILES
      The name of the request attribute with which an array of all Files (java.io.File[]) that were uploaded will be stored.
      See Also:
  • Constructor Details

    • MultipartUploadFilter

      public MultipartUploadFilter()
  • Method Details

    • init

      public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Filter
      Throws:
      javax.servlet.ServletException
    • doFilter

      public void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain) throws IOException, javax.servlet.ServletException
      Specified by:
      doFilter in interface javax.servlet.Filter
      Throws:
      IOException
      javax.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.servlet.Filter