天天看点

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