在浏览器输入文字提交表单控制台信息乱码
我也踩过这个坑( 1 )
SSM
详细描述
错误截图
编辑于2024-11-23
-
[上海|结业弟子]JAVA-胡畔0
在web.xml中添加字符过滤器
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>编辑于2019-06-15
- 去第 页