org.springframework.web.filter
Class HttpPutFormContentFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.springframework.web.filter.HttpPutFormContentFilter
- All Implemented Interfaces:
- Filter, Aware, BeanNameAware, DisposableBean, InitializingBean, EnvironmentAware, ServletContextAware
public class HttpPutFormContentFilter
- extends OncePerRequestFilter
Filter
that makes form encoded data available through
the ServletRequest.getParameter*()
family of methods during HTTP PUT
requests.
The Servlet spec requires form data to be available for HTTP POST but
not for HTTP PUT requests. This filter intercepts HTTP PUT requests where
content type is 'application/x-www-form-urlencoded'
, reads form
encoded content from the body of the request, and wraps the ServletRequest
in order to make the form data available as request parameters just like
it is for HTTP POST requests.
- Since:
- 3.1
- Author:
- Rossen Stoyanchev
Methods inherited from class org.springframework.web.filter.GenericFilterBean |
addRequiredProperty, afterPropertiesSet, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpPutFormContentFilter
public HttpPutFormContentFilter()
setCharset
public void setCharset(Charset charset)
- The default character set to use for reading form data.
doFilterInternal
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response,
FilterChain filterChain)
throws ServletException,
IOException
- Description copied from class:
OncePerRequestFilter
- Same contract as for
doFilter
, but guaranteed to be
just invoked once per request. Provides HttpServletRequest and
HttpServletResponse arguments instead of the default ServletRequest
and ServletResponse ones.
- Specified by:
doFilterInternal
in class OncePerRequestFilter
- Throws:
ServletException
IOException