JSP页面报错illegal to have multiple occurrences of contentType with different values

当一个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写成一致,一定要一致,我曾经尝试着在一个里面加上一个空格也出现了这样的错误。

猜你喜欢

转载自blog.csdn.net/qq_36443497/article/details/79543266
今日推荐