In order to use JSTL (JSP taglibs) in a maven project, one needs to import:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
Yet, that’s not enough since this is only an API. One solution is to uses Glassfish’s implementation, another is to use Apache Taglibs.
What is the difference between both and which one is recommended?
Both support JSDL 1.2 now.
The Glassfish one supports JSTL 1.2 whereas Apache’s supports 1.1 with “1.2 in the works” – since 2009, which in my opinion could mean that the project was sort of abandoned. I already transplanted the GF one into Tomcat (as most of our work is GF based it was the easiest one to borrow) and didn’t encounter problems, but I may just have been lucky 🙂EDIT: wrt JSTL1.1 vs 1.2, quoting from the Oracle JSTL page