mor*_*rja 8 java jsp jstl jakarta-ee
我尝试从 Spring 5 升级到 Spring 6 并收到以下错误:
Unable to find taglib [c] for URI: [jakarta.tags.core]
我的 pom 中有以下内容:
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
<version>5.0.1</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
我在 JSP 中使用这样的 URI:
<%@ taglib prefix="c" uri="jakarta.tags.core" %>
Run Code Online (Sandbox Code Playgroud)
根据https://jakarta.ee/specifications/tags/3.0/jakarta-tags-spec-3.0.html#preface ,URI 应正确。我找不到任何关于我缺少包含哪些依赖项的文档。
确保不仅添加 API,还添加 Jakarta 标签实现:
梅文
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jakarta.servlet.jsp.jstl</artifactId>
<version>3.0.0</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
摇篮
implementation 'org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.0'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10156 次 |
| 最近记录: |