Package org.eclipse.jetty.servlets
Class MultiPartFilter
java.lang.Object
org.eclipse.jetty.servlets.MultiPartFilter
- All Implemented Interfaces:
javax.servlet.Filter
Deprecated.
See servlet 3.0 apis like javax.servlet.http.HttpServletRequest.getParts()
Multipart Form Data Filter.
This class is ONLY needed if you cannot use the Servlet 3.0 APIs for configuring and handling multipart requests. See javax.servlet.http.HttpServletRequest.getParts(). If you use the new servlet apis then you should REMOVE this filter from your webapp.
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 temporary 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.
Init Parameters:
- delete
- (boolean) If set to "true", any files created will be deleted when the current request returns.
- maxFormKeys
- (number)
Sets the maximum number of keys that may be present in a
form (default set by system property
org.eclipse.jetty.server.Request.maxFormKeys
or 1000) to protect against DOS attacks by bad hash keys. - deleteFiles
- (boolean) Controls if uploaded files are automatically deleted after the request completes.
- maxFileSize
- (size in bytes) Set the max size file that can be uploaded.
- maxRequestSize
- (size in bytes) To limit the size of the multipart request.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate javax.servlet.ServletContext
Deprecated.private boolean
Deprecated.private int
Deprecated.private long
Deprecated.private int
Deprecated.private long
Deprecated.private boolean
Deprecated.static final String
Deprecated.private static final Logger
Deprecated.private static final String
Deprecated.private File
Deprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
deleteFiles
(javax.servlet.ServletRequest request) Deprecated.void
destroy()
Deprecated.void
doFilter
(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) Deprecated.void
init
(javax.servlet.FilterConfig filterConfig) Deprecated.
-
Field Details
-
LOG
Deprecated. -
CONTENT_TYPE_SUFFIX
Deprecated.- See Also:
-
MULTIPART
Deprecated.- See Also:
-
tempdir
Deprecated. -
_deleteFiles
private boolean _deleteFilesDeprecated. -
_context
private javax.servlet.ServletContext _contextDeprecated. -
_fileOutputBuffer
private int _fileOutputBufferDeprecated. -
_writeFilesWithFilenames
private boolean _writeFilesWithFilenamesDeprecated. -
_maxFileSize
private long _maxFileSizeDeprecated. -
_maxRequestSize
private long _maxRequestSizeDeprecated. -
_maxFormKeys
private int _maxFormKeysDeprecated.
-
-
Constructor Details
-
MultiPartFilter
public MultiPartFilter()Deprecated.
-
-
Method Details
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException Deprecated.- Specified by:
init
in interfacejavax.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 IOException, javax.servlet.ServletException Deprecated.- Specified by:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
- See Also:
-
Filter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
-
deleteFiles
private void deleteFiles(javax.servlet.ServletRequest request) Deprecated. -
destroy
public void destroy()Deprecated.- Specified by:
destroy
in interfacejavax.servlet.Filter
- See Also:
-
Filter.destroy()
-