jsp1的第一行:html
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>java
jsp2的第一行jsp
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false"%>htm
在jsp1中includejsp2,就会致使illegal to have multiple occurrences of 'contentType' with different values (old: text/html; charset=ISO-8859-1, new: text/html; charset=utf-8)报错,ip
注意查看两个文件的第一行,发现jsp2的contentType="text/html; charset=utf-8"中charset前多了一个空格,删掉此空格。而且jsp2中的UTF-8为大写,改为小写,严格保持jsp一、jsp2两个文件一致,报错解决。utf-8