## org.mortbay.servlet
Class MultiPartFilter

    java.lang.Object
      org.mortbay.servlet.MultiPartFilter

All Implemented Interfaces:
  javax.servlet.Filter

    public class MultiPartFilter

extends java.lang.Object
implements javax.servlet.Filter

Multipart Form Data Filter.

This class decodes the multipart/form-data stream sent by a HTML form that uses a file input item. Any files sent are stored to a tempary file and a File object added to the request as an attribute. All other values are made available via the normal getParameter API and the setCharacterEncoding mechanism is respected when converting bytes to Strings. If the init paramter "delete" is set to "true", any files created will be deleted when the current request returns.

Author:
  Greg Wilkins, Jim Crossley

Constructor Summary
`MultiPartFilter()`

Method Summary
`void` `destroy()`
`void` `doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)`
`void` `init(javax.servlet.FilterConfig filterConfig)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MultiPartFilter

    public MultiPartFilter()

Method Detail

### init

    public void init(javax.servlet.FilterConfig filterConfig)
              throws javax.servlet.ServletException

  Specified by:
    `init` in interface `javax.servlet.Filter`
  Throws:
    `javax.servlet.ServletException`
  See Also:
    `Filter.init(javax.servlet.FilterConfig)`

### doFilter

    public void doFilter(javax.servlet.ServletRequest request,
                         javax.servlet.ServletResponse response,
                         javax.servlet.FilterChain chain)
                  throws java.io.IOException,
                         javax.servlet.ServletException

  Specified by:
    `doFilter` in interface `javax.servlet.Filter`
  Throws:
    `java.io.IOException`
    `javax.servlet.ServletException`
  See Also:
    `Filter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)`

### destroy

    public void destroy()

  Specified by:
    `destroy` in interface `javax.servlet.Filter`
  See Also:
    `Filter.destroy()`

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.