/WEB-INF/pages/common/head.jsp (line: 1, column: 2) Page directive: illegal to have multiple occurrences of contentType with different values (old: text/html; charset=UTF-8, new: text/html; charset=ut

这是jsp错误,

  1. 不允许contentType="text/html; charset=UTF-8",有空格。

    之前错误写法为:<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

    正确写法为:<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>

  2.在我的jsp页面(A页面)有引入其他的jsp页面(B页面),两个页面的抬头不相同导致的错误。

    A页面:<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

    B页面:<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

posted @ 2017-11-12 23:09  向上的栗子  阅读(1848)  评论(0编辑  收藏  举报