一、浏览器发送到服务器的数据有乱码 ①get 在tomcat/conf/server.xml的<Connector>标签中添加一个属性:URIEncoding="utf-8" ②post request.setCharacterEncoding("utf-8")二、服务器返回到浏览器的数据有乱码 response.setContentType("text/html; charset=utf-8")