码迷,mamicode.com
首页 > 其他好文 > 详细

illegal to have multiple occurrences of contentTyp

时间:2015-08-17 17:36:44      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:

jsp1的第一行:

<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>

jsp2的第一行

<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false"%>

在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)报错,

注意查看两个文件的第一行,发现jsp2的contentType="text/html; charset=utf-8"中charset前多了一个空格,删掉此空格。并且jsp2中的UTF-8为大写,改成小写,严格保持jsp1、jsp2两个文件一致,报错解决。


illegal to have multiple occurrences of contentTyp

标签:

原文地址:http://my.oschina.net/sniperLi/blog/493525

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!