1. 程式人生 > >報錯: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

jsp org 如果 charset line 可能 技術分享 書寫 ive

技術分享圖片

上面報錯提示的是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錯誤則考慮是否<%@taglib prefix="c"uri="http://java.sun.com/jsp/jstl/core"%>書寫有誤,可能沒有寫等於號(=),或者標點符號少寫或有誤。

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