tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Tomcat Wiki] Update of "FAQ/CharacterEncoding" by KonstantinKolinko
Date Mon, 26 Jan 2015 07:00:03 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.

The "FAQ/CharacterEncoding" page has been changed by KonstantinKolinko:
https://wiki.apache.org/tomcat/FAQ/CharacterEncoding?action=diff&rev1=25&rev2=26

Comment:
Simplify

  webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java
  }}}
   5.5.36+, 6.0.36+, 7.0.20+, 8.x::
- Since 7.0.20 the filter became first-class citizen and was moved from the examples into
core Tomcat and is available to any web application without the need to compile and bundle
it separately.
+ Since Tomcat 7.0.20, 6.0.36 and 5.5.36 the filter became first-class citizen and was moved
from the examples into core Tomcat and is available to any web application without the need
to compile and bundle it separately.
  See documentation for the list of [[http://tomcat.apache.org/tomcat-8.0-doc/config/filter.html|filters]]
provided by Tomcat. The class name is:
  {{{
  org.apache.catalina.filters.SetCharacterEncodingFilter
  }}}
- 
- It was also ported to older Tomcat versions and is available there starting with versions
5.5.36 and 6.0.36.
  
  '''''Note''''': The request encoding setting is effective only if it is done earlier than
parameters are parsed. Once parsing happens, there is no way back. Parameters parsing is triggered
by the first method that asks for parameter name or value. Make sure that the filter is positioned
before any other filters that ask for request parameters. The positioning depends on the order
of `filter-mapping` declarations in the WEB-INF/web.xml file, though since Servlet 3.0 specification
there are additional options to control the order. To check the actual order you can throw
an Exception from your page and check its stack trace for filter names.
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message