标签:des style blog http io ar sp java for
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/>
request.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=UTF-8");
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<filter> <filter-name>SetCharacterEncodingFilter</filter-name> <filter-class>com.bzu.servlet.SetCharacterEncodingFilter</filter-class> </filter> <filter-mapping> <filter-name>SetCharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { request.setCharacterEncoding("UTF-8");//处理编码 response.setCharacterEncoding("UTF-8");//处理编码 chain.doFilter(request, response);//让过滤器执行下一个请求 } public void destroy() { } public void init(FilterConfig arg0) throws ServletException { }
accept-charset="utf-8" onsubmit="document.charset='utf-8';"
show variables like '%char%';
default-character-set=utf8 default-storage-engine=INNODB
之后重启MySQL,之后果真问题解决了。
附带群的qq号, 293074111希望群里能帮助一下真正爱学习Java的同学
标签:des style blog http io ar sp java for
原文地址:http://blog.csdn.net/cxy782255346/article/details/41173577