I know that Tomcat v10.1, refers to the following SPECS :
- Servlet 6.0
- JSP 3.1
- EL 5.0
So my Graddle dependencies are :
dependencies {
compileOnly "jakarta.servlet:jakarta.servlet-api:6.0.0"
compileOnly "jakarta.servlet.jsp:jakarta.servlet.jsp-api:3.1.0"
compileOnly "jakarta.el:jakarta.el-api:5.0.0"
}
I suppose Tomcat already have those libraries, so I use compileOnly
.
The problem is that I also need to add corresponding JSTL library, to support old JSP files that includes JSTL tag.
In my JSP files, I fix the correct JSTL tag to :
<%@ taglib prefix="c" uri="jakarta.tags.core" %>
Now regarding the import, I add those depedencies :
implementation 'jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.0'
The problem is that the jakarta.tags.core
is not recognized, I have an exception on it.
Questions :
The JSP spec must be 3.1. Howerver the most recent dependency on Maven is
jstl-api:3.0.0
(instead of3.1.0
that don't exist). Do that version compliant with JSP spec 3.1 ?How to fix the error ?
compile 'org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1'
ANDcompile 'jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.0'