java - Tomcat post special characters -
this question has answer here:
in maven project have html form post data httpservlet. on moment post special characters in html form (e.g. "jänsen", httpservlet receives "jänsen".
i think need change settings utf-8 don't know have that...
you can try configure org.apache.catalina.filters.setcharacterencodingfilter
in web.xml
next:
<filter> <filter-name>set character encoding</filter-name> <filter-class>org.apache.catalina.filters.setcharacterencodingfilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>utf-8</param-value> </init-param> <init-param> <param-name>ignore</param-name> <param-value>false</param-value> </init-param> </filter> <filter-mapping> <filter-name>set character encoding</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
filter sets character encoding used in parsing incoming request, either unconditionally or if client did not specify character encoding.
more info filter here
Comments
Post a Comment