public class FormContentFilter extends OncePerRequestFilter
Filter
that parses form data for HTTP PUT, PATCH, and DELETE requests
and exposes it as Servlet request parameters. By default the Servlet spec
only requires this for HTTP POST.ALREADY_FILTERED_SUFFIX
logger
Constructor and Description |
---|
FormContentFilter() |
Modifier and Type | Method and Description |
---|---|
protected void |
doFilterInternal(HttpServletRequest request,
HttpServletResponse response,
FilterChain filterChain)
Same contract as for
doFilter , but guaranteed to be
just invoked once per request within a single request thread. |
void |
setCharset(Charset charset)
The default character set to use for reading form data.
|
void |
setFormConverter(FormHttpMessageConverter converter)
Set the converter to use for parsing form content.
|
doFilter, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
public void setFormConverter(FormHttpMessageConverter converter)
By default this is an instance of AllEncompassingFormHttpMessageConverter
.
public void setCharset(Charset charset)
getFormConverter.setCharset(charset)
.protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException
OncePerRequestFilter
doFilter
, but guaranteed to be
just invoked once per request within a single request thread.
See OncePerRequestFilter.shouldNotFilterAsyncDispatch()
for details.
Provides HttpServletRequest and HttpServletResponse arguments instead of the default ServletRequest and ServletResponse ones.
doFilterInternal
in class OncePerRequestFilter
ServletException
IOException