In Java web development with JSP and JSTL, you may encounter the following compile error in your Java web project:

Can not find the tag library descriptor for "jakarta.tags.core"

Given that you specify taglib directive for using JSTL core tags (or other tags) in a JSP file as follows:

<%@ taglib prefix="c" uri="jakarta.tags.core" %>

So what is the cause of this error and how to fix? What’s the permanent solution?

You know, this compile error appears in an IDE because no JSTL libraries present in the classpath. In other words, the compiler could not find any description of JSTL tags in the project’s dependencies or referenced JAR files.

The solution to solve this error is specifying the correct dependencies of JSTL API and implementation. If you’re using Maven, make sure you include the following dependency declaration:

<dependency>
	<groupId>jakarta.servlet.jsp.jstl</groupId>
	<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
	<version>3.0.0</version>
</dependency>  
<dependency>
	<groupId>org.glassfish.web</groupId>
	<artifactId>jakarta.servlet.jsp.jstl</artifactId>
	<version>3.0.1</version>
</dependency>

This will definitely solve the compile error Can not find tag library descriptor for “jakarta.tags.core” in your Java web project.

 

Learn more:


About the Author:

is certified Java programmer (SCJP and SCWCD). He started programming with Java in the time of Java 1.4 and has been falling in love with Java since then. Make friend with him on Facebook and watch his Java videos you YouTube.



Add comment