解决jsp中文乱码问题的几个步骤
1 jsp页面设置
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
2 servlet设置
request.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=utf-8");
3 tomcat设置
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="utf-8"/>
4 重启服务