Servlet 2.3/2.4 Filter that allows one to specify a character encoding for
requests. This is useful because current browsers typically do not set a
character encoding even if specified in the HTML page or form.
Whether this encoding will override existing request encodings
(and whether it will be applied as default response encoding as well)
depends on the
CharacterEncodingFilter.setForceEncoding "forceEncoding" flag.
setForceEncoding
public void setForceEncoding(boolean forceEncoding)(Code)
Set whether the configured
CharacterEncodingFilter.setEncoding encoding of this filter
is supposed to override existing request and response encodings.
Default is "false", i.e. do not modify the encoding if
javax.servlet.http.HttpServletRequest.getCharacterEncoding returns a non-null value. Switch this to "true" to enforce the specified
encoding in any case, applying it as default response encoding as well.
Note that the response encoding will only be set on Servlet 2.4+
containers, since Servlet 2.3 did not provide a facility for setting
a default response encoding.
Fields inherited from org.springframework.web.filter.OncePerRequestFilter