The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar

来源:互联网 发布:实时数据库软件有哪些 编辑:程序博客网 时间:2024/06/17 11:26

情况描述:

在myeclipse下导入一个使用JSTL标签的web项目

启动后报错

The absoluteuri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml orthe jar files deployed with this application

 

检查java buildpath libraries,已经有jstl-1.2.jar包

 

解决方案:

将jstl-1.2.jar复制到WEB-INF/lib下,这样即便删除java buildpath libraries中的jstl-1.2.jar包也没有问题,感觉好奇怪

原因可能是:

Note how the URI makes no reference to the actual jar file or theMETA-INF directory, but the URL is matched to the tag file within thejar because the container (Apache Tomcat in my setup) automaticallysearches through any of the jars in the WEB-INF\lib directory.

请注意,URI并没有引用实际的jar文件或META-INF目录,但该URL与jar中的标记文件相匹配,因为容器(Apache Tomcat)会自动在WEB-INF \ lib目录搜索jar文件

 

以后有时间试一下maven项目中使用jstl标签的情况,留个坑在这

阅读全文
0 0
原创粉丝点击