学习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>
本文作者:wsLin
本文链接:https://www.cnblogs.com/hectorlin/p/16052268.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步