情况描述:
在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标签的情况,留个坑在这