情况是这样的:
在一个jsp文件中包含另外一个jsp文件(比如:jsp头部和尾部文件)
有时候会出现以下错误:
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /lightworkflow/sheet/depponOrder/proCitySelAll.jsp(1,2) Page directive: illegal to have multiple occurrences of contentType with different values (old: text/html; charset=UTF-8, new: text/html; charset=utf-8)
原来是包含页面与被包含页面的@page指令里面的contentType不一致,仔细检查两个文件第一行的 @page,原因问题出在主jsp页面中的顶部字符编码和从jsp顶部字符编码格式有误,要统一,中间不需要空格之类,否则一直报错