天天看點

java.lang.NoClassDefFoundError: org/apache/taglibs/standard/tag/rt/core/UrlTag JSTL: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

剛剛使用jstl,然後出現問題了。好吧,上網找解決方法。

java.lang.NoClassDefFoundError: org/apache/taglibs/standard/tag/rt/core/UrlTag JSTL: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

出現如下問題:

JSTL: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

錯誤描述。有人說是缺少jar包,好吧。是真的缺少jar包。當你使用的時候,看下項目中是否缺少jar包。缺少jar包,那麼問題來了,缺哪個或者說是缺哪幾個。看下邊這兩個可能是都缺少。缺少的位置也是兩個,一個是本地項目中。一個是tomcat中。本地項目在tomcat中編譯是不帶jstl的jar包的,是以,你tomcat的webapp的項目中可能也是缺少jar包。tomcat的 lib 目錄下也可能缺少。試試你的問題。看看怎麼解決。

注意:有人說,隻需要添加一個jstl.jar就可以了。你可以試試,不行就再添加上standard-1.1.2.jar。我是往tomcat的lib中添加了這兩個包,然後執行沒有問題的。

去掉這兩個包也可能出現這個問題: java.lang.NoClassDefFoundError: org/apache/taglibs/standard/tag/rt/core/UrlTag