Issues with JSTL taglibs when migrating to Spring Boot 3

12 Views Asked by At

I am in the process of migrating my Spring Boot JSP application from Spring Boot 2.7 to Spring Boot 3. my login page has this line at the beginning and several references to the <c:if> tag:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

This page worked fine in Spring Boot 2.7, but in Spring Boot 3, I get the following error:

java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator

I assume this has something to do with the move from javax to jakarta I have added the following to my pom.xml

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet.jsp.jstl</groupId>
            <artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
            <version>3.0.0</version>
        </dependency>
0

There are 0 best solutions below