今天遇到問題:
java
The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this applicationweb
在eclipse 中jetty 服務器中能夠正常啓動,打好war包後在tomcat 下就報錯了!tomcat
網絡答案:服務器
這個是你的<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>,uri路徑寫錯了,是jstl1.1版本一下的去standard.jar文件的META-INF中的c.tld中看uri路徑是否多寫了jsp(如:http://java.sun.com/jstl/core)。網絡
可能一:app
web項目出現如上問題,據查是版本問題:eclipse
JSTL 1.0 的聲明是:jsp
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core " %>ide
JSTL1.1 的聲明是:工具
<%@ taglib prefix="c" uri=http://java.sun.com/jsp/jstl/core %>
項目中,已是 jstl 1.2 版本了,頁面中也所有是用<%@ taglib prefix="c" uri=http://java.sun.com/jsp/jstl/core %>這種方式。javaee5以後就只有 jstl.jar 這一個jar包了,沒有standard.jar包,tld文件也打包到jar裏面去了,啥在web.xml文件裏配置jsp-config的解決方式也是浮雲。
可能二:
最終查到問題是 jstl.jar 包在ide項目中有,但在tomcat發佈的應用WEB-INF/lib下沒有,這是工具發佈項目的問題,複製一個jar包過去問題就解決了。
>>jstl.jar沒有
我遇到的是第二種狀況。
參考資料:
http://aokunsang.iteye.com/blog/936230
http://blog.csdn.net/lzz313/article/details/7554736