不用再担心java中文乱码问题,一步到位,一次性解决。更方便更快捷。
web-xml配置
<filter>
<filter-name>EncodingFilter</filter-name>
<filter-class>com.epet.util.EncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>GBK</param-value>
</init-param>
<init-param>
<param-name>ignore</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>EncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>