不用再擔心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>