操作系统:MacOS 10.15
开发环境:eclipse 2019-06 (4.12.0)+maven3.5.4+tomcat7.0.90
问题描述
Message: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
Exception:org.apache.jasper.JasperException: 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
出错原因
在引用C标签<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
时无法解析http://java.sun.com/jsp/jstl/core,原因是没有导入jstl的实现
解决办法
1.简单粗暴添加taglibs-standard-impl.jar/taglibs-standard-impl.jar+taglibs-standard-spec
2.使用maven的话,添加(需要版本对应)——我自己的办法
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-impl</artifactId>
<version>1.2.5</version>
</dependency>
<!-- 我没有加也可以运行了-->
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId