0

I am trying to use jstl in my java spring mvc project.

here is the dependency

<dependency>
    <groupId>jstl</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>

I have added the following line to use jstl in my jsp

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

but when i am trying to access that page it is giving me following error.

class org.apache.taglibs.standard.tlv.JstlCoreTLV cannot be cast to class jakarta.servlet.jsp.tagext.TagLibraryValidator

does anyone has any idea what could be wrong?

KUNAL HIRANI
  • 641
  • 1
  • 7
  • 20

1 Answers1

0

After searching about it i found out that there is some jakarta migration issue with the tomcat10 server. which is mentioned here.

so we can use glassfish jstl implementation:

dependency>
    <groupId>org.glassfish.web</groupId>
    <artifactId>jakarta.servlet.jsp.jstl</artifactId>
    <version>2.0.0-M1</version>
</dependency>

with addition of this dependency error was solved.

KUNAL HIRANI
  • 641
  • 1
  • 7
  • 20