报错:org.apache.jasper.JasperException: /jsp/head.jsp (line: 1, column: 2) Page directive: illegal to

时间:2021-05-05 08:46:13

报错:org.apache.jasper.JasperException: /jsp/head.jsp (line: 1, column: 2) Page directive: illegal to

上面报错提示的是org.apache.jasper.JasperException: /jsp/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=utf-8)
即:在/ jsp /head.jsp中(行:1,列:2)页指令:非法有多个不同值的内容类型(旧的:文本/ html;charset = utf - 8,新:text / html;charset = utf - 8),可查看头部信息是否过期,如过期错误的写法:

报错:org.apache.jasper.JasperException: /jsp/head.jsp (line: 1, column: 2) Page directive: illegal to

应该改为:

报错:org.apache.jasper.JasperException: /jsp/head.jsp (line: 1, column: 2) Page directive: illegal to

同时如果头部写法无错误,仍然报org.apache.jasper.JasperException错误则考虑是否<%@taglib prefix="c"uri="http://java.sun.com/jsp/jstl/core"%>书写有误,可能没有写等于号(=),或者标点符号少写或有误。