Java MVC自定义错误页遇到问题
我正在用SpringMVC实现一个用于404、400和500错误的自定义错误页面,并且我在jsp页面上遇到了编码问题 我在web.xml文件中添加了错误操作页面:Java MVC自定义错误页遇到问题,java,spring,jsp,spring-mvc,Java,Spring,Jsp,Spring Mvc,我正在用SpringMVC实现一个用于404、400和500错误的自定义错误页面,并且我在jsp页面上遇到了编码问题 我在web.xml文件中添加了错误操作页面: <error-page> <error-code>404</error-code> <location>/404</location> </error-page> 和响应标题: Cache-control:no-store, no-cache,
<error-page>
<error-code>404</error-code>
<location>/404</location>
</error-page>
和响应标题:
Cache-control:no-store, no-cache, must-revalidate
Cache-control:post-check=0, pre-check=0
Content-Encoding:gzip
Content-Language:en
Content-Length:429
Content-Type:text/html;charset=UTF-8
Date:Tue, 13 Oct 2015 09:15:20 GMT
Expires:Sat, 6 May 1995 12:00:00 GMT
Pragma:no-cache
Server:Apache-Coyote/1.1
似乎压缩(gzip)和字符集(UTF-8)都是正确的,但即使如此,浏览器仍在报告编码错误,而不是显示自定义错误页。。。谁能帮帮我吗
问候
<!-- INCLUDES -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
djhfakjhfkahakjf
</body>
</html>
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch
Accept-Language:es-ES,es;q=0.8
Cache-Control:max-age=0
Cookie:JSESSIONID=75CD658DF19B2E6DB3EB12FD354E36C3
Host:localhost:8080
http_axa_mail:albert.martinez.altran@axa-groupsolutions.com
Proxy-Connection:keep-alive
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36
Cache-control:no-store, no-cache, must-revalidate
Cache-control:post-check=0, pre-check=0
Content-Encoding:gzip
Content-Language:en
Content-Length:429
Content-Type:text/html;charset=UTF-8
Date:Tue, 13 Oct 2015 09:15:20 GMT
Expires:Sat, 6 May 1995 12:00:00 GMT
Pragma:no-cache
Server:Apache-Coyote/1.1