我正在使用Java/Jakarta,Maven和Tomcat10在IntelliJ中开发一个web应用程序,因此我想使用JSTL标签,但是不能让它们工作。
通过Maven,我添加了org.glassfish.web:jakarta.servlet.jsp.jstl:2.0.0.我的项目。我还在Tomcat/lib文件夹中添加了jar文件。
在我添加的jsp文件中:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>为了解决“绝对uri:http://java.sun.com/jstl/core无法在web.xml或与该应用程序一起部署的jar文件中解析”的问题,我在我的pom.xml中添加了依赖项
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jakarta.servlet.jsp.jstl</artifactId>
<version>2.0.0</version>
</dependency>现在我遇到了以下问题:
java.lang.NoClassDefFoundError: jakarta/servlet/jsp/jstl/core/LoopTag感谢您的宝贵时间:)!
发布于 2021-07-11 03:22:52
jakarta.servlet.jsp.jstl-2.0.0.jar和jakarta.servlet.jsp.jstl-api-2.0.0.jar文件不在Tomcat/lib文件夹中。
它们应该放在.war文件中的WEB-INF/lib文件夹中。
https://stackoverflow.com/questions/68330612
复制相似问题