Bazinga!
tomcat 7 org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
You can dive into our beloved stackoverflow.com to find out that Tomcat doesn’t include JSTL,not even in Tomcat 8, in spite that they have an implementation of the JSP Standard Tag Library (JSTL) specification, versions 1.0, 1.1 and 1.2.
Of course, I have the correct taglib in the JSPs (note the /jsp within the URI):
1 |
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> |
I don’t want to include the JSTL jar included in the war, because it works in GlassFish (time to move to this server, or even try WildFly). Find here some interesting instructions if it is not your case.
Thus, it’s time to copy the JSTL.jar (available almost anywhere)
In NetBeans, you can go to Services (Window -> Services), find the Servers entry, right click in Apache Tomcat 8.0.3.0 to see its properties. This is the long way to discover where Tomcat is installed. In my case: /usr/local/apache-tomcat-8.0.3.
So I copied one of the available maven dependencies that I used to have and after restarting Tomcat, everything went OK.
1 2 |
$ cd /usr/local/apache-tomcat-8.0.3 $ sudo cp ~/.m2/repository/javax/servlet/jstl/1.2/jstl-1.2.jar . |