閱讀113 返回首頁    go 阿裏雲 go 技術社區[雲棲]


J2EE中使用jstl報http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar錯

一、發現問題

運行引用了jstl的jsp頁麵

報https://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar錯



二、原因分析

可能一:版本問題

JSTL1.0 的聲明是:<%@ taglib prefix="c" uri="https://java.sun.com/jstl/core " %>
JSTL1.1 的聲明是:<%@ taglib prefix="c" uri=https://java.sun.com/jsp/jstl/core %>

可能二:沒有standard.jar

javaee5自帶的已經是jstl1.2版本了,頁麵中也全部是用<%@ taglib prefix="c" uri=https://java.sun.com/jsp/jstl/core %>這種方式。

但javaee5之後就自帶隻有jstl.jar這一個,沒有standard.jar,tld文件也打包到jar裏去了,不存在web.xml文件裏配置jsp-config的辦法。

試著添加standard.jar試試。


可能三:tomcat發布的應用WEB-INF/lib下沒有jstl.jar

jstl.jar包在ide項目中有,但在tomcat發布的應用WEB-INF/lib下沒有,這是工具發布項目的問題,複製一個jar包過去問題就解決了。


原帖地址:https://blog.csdn.net/lzz313/article/details/7554736


最後更新:2017-04-03 22:15:29

  上一篇:go POJ 1228 凸包
  下一篇:go J2EE中使用jstl報http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar錯