A common issue in Java development with JSP and JSTL is how to import the correct dependency referencing JSTL library, especially Jakarta Standard Tag Library (JSTL 2.0 or newer) which replaces the old JSP Standard Tag Library (JSTL 1.2).

To use Jakarta JSTL in your Java web project with Maven, add the following dependencies into the pom.xml file:

<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>

The first dependency jakarta.servlet.jsp.jstl-api contains JSTL API specification and the second one, jakarta.servlet.jsp.jstl contains implementations of Jakarta Standard Tag Library.

To get the latest versions of these JSTL dependencies, you can check on Maven online repository at this link and this one.

I hope you find this post helpful in Java web programming with JSP and JSTL.

 

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

   


Comments 

#1Germain Musul Mukeng2024-03-28 14:53
Do you have a complete example project, where in you are implementing Jakarta servlet and JSP with JSTL core library?
Quote