学习Jstl中遇到的报错:无法在web.xml或使用此应用程序部署的jar文件中解析绝对uri:[http://java.sun.com/jsp/jstl/core];24-Mar-2022 21:29:40.784 涓ラ噸 [http-nio-8080-exec-4] org.apache.catalina.core.StandardWrapperValve.invoke 鍦ㄨ矾寰...
今天在学习jstl时遇到了一个关于jar包的问题,在网上找了很多做法也没解决;后面还是通过这篇博客得到了解决。(附上链接:https://www.cnblogs.com/suliull/p/14131985.html)
前端显示:

后端日志:

原因:tomcat的lib目录下缺少jstl-api-1.2.jar和standard-1.1.2.jar这两个jar包。如果本地mave仓库中有这两个jar包直接复制粘贴到tomcat的lib目录就好;没有的话百度下载或者用我下面的链接
jstl-api-1.2.jar:https://repo1.maven.org/maven2/javax/servlet/jsp/jstl/jstl-api/1.2/
standard-1.1.2.jar :https://repo1.maven.org/maven2/taglibs/standard/1.1.2/
下面是我在pom.xml导入的相关依赖:
<!-- https://mvnrepository.com/artifact/org.apache.taglibs/taglibs-standard-impl --> <dependency> <groupId>org.apache.taglibs</groupId> <artifactId>taglibs-standard-impl</artifactId> <version>1.2.5</version> <scope>runtime</scope> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.taglibs/taglibs-standard-spec --> <dependency> <groupId>org.apache.taglibs</groupId> <artifactId>taglibs-standard-spec</artifactId> <version>1.2.5</version> </dependency>
开始看文章说只用导入上面两个依赖就行,一个实现类库一个标准接口。出现问题后找了一下答案,又添加了下面两个依赖。本着能多不能少的思想,以后我就一起添加吧。
<!-- https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl-api --> <dependency> <groupId>javax.servlet.jsp.jstl</groupId> <artifactId>jstl-api</artifactId> <version>1.2</version> </dependency> <!-- https://mvnrepository.com/artifact/taglibs/standard --> <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <version>1.1.2</version> </dependency>

浙公网安备 33010602011771号