您的位置:首页 > 产品设计 > UI/UE

illegal to have mutiple occurrences of contentType with different values

2009-11-04 18:49 411 查看
当一个jsp页面包含另外一个jsp页面或者HTML页面时,如果出现了乱码,或者是出现了“org.apache.jasper.JasperException: /stuHead.html(2,0) Page directive: illegal to have multiple occurrences of contentType with different values (old: text/html;charset=gb2312, new: text/html; charset=gb2312)”,这样的错误,就应该把把包含页面与被包含页面的@page指令里面的contentType写成一致,一定要一致.我的错误是用了两个

<%@ page contentType="text/html; charset=utf-8" %>

<%@ page contentType="text/html; charset=GB2312" %>

这样系统不知道你到底要用哪个编码了!

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐