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:
org.eclipse.jetty.server.Request.maxFormKeys
or 1000) to protect against DOS attacks by bad hash keys. 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 @author Jim Crossley
Looks up the MultipartResolver in Spring's root web application context. Supports a "multipartResolverBeanName" filter init-param in web.xml
; the default bean name is "filterMultipartResolver". Looks up the MultipartResolver on each request, to avoid initialization order issues (when using ContextLoaderServlet, the root application context will get initialized after this filter).
If no MultipartResolver bean is found, this filter falls back to a default MultipartResolver: {@link StandardServletMultipartResolver} for Servlet 3.0,based on a multipart-config section in web.xml
.
MultipartResolver lookup is customizable: Override this filter's lookupMultipartResolver
method to use a custom MultipartResolver instance, for example if not using a Spring web application context. Note that the lookup method should not create a new MultipartResolver instance for each call but rather return a reference to a pre-built instance.
Note: This filter is an alternative to using DispatcherServlet's MultipartResolver support, for example for web applications with custom web views which do not use Spring's web MVC, or for custom filters applied before a Spring MVC DispatcherServlet (e.g. {@link org.springframework.web.filter.HiddenHttpMethodFilter}). In any case, this filter should not be combined with servlet-specific multipart resolution. @author Juergen Hoeller @since 08.10.2003 @see #setMultipartResolverBeanName @see #lookupMultipartResolver @see org.springframework.web.multipart.MultipartResolver @see org.springframework.web.servlet.DispatcherServlet
|
|
|
|
|
|
|
|
|
|
|
|