http应答如下,显示字符集已经是utf-8了,为什么下面的html还是乱码呢?
还需要在JSP中另外加入<%@page contentType="text/html; charset=utf-8"%>才能解决问题
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 114
Date: Thu, 17 Mar 2016 12:04:50 GMT
<html>
<head>
<title>!!!!!!!</title>
</head>
<body>
第1次访é®jsp
</body>
</html>
web.xml
<filter>
<filter-name>EncodingFilter</filter-name>
<filter-class>EncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>EncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>