Jakarta JSTL Maven Dependency
- Details
- Written by Nam Ha Minh
- Last Updated on 07 March 2024   |   Print Email
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.
Comments