I created a JSF 2.0 Project using maven and made a hello.xhtml page . I did not include the jstl dependency but on my hello.xhtml page I am using jstl core tag by including this namespace “xmlns:c=”http://java.sun.com/jsp/jstl/core”.
And used the following tag which is working fine.
<c:set var="test" value="${2000*2}"/>
#{test}
Now I am wonder that how is this happening, even I checked the generated war file as well and there is no jstl jar . Can anyone know that how it is happening.
JSTL (and JSF!) are already provided out the box by Java EE web profile compatible containers such as Glassfish, JBoss AS, etc. They are only not provided out the box by barebones JSP/Servlet containers such as Tomcat, Jetty, etc.
Apparently your target server is a Java EE web profile compatible container. This way you don’t need to provide JSTL (nor JSF!) yourself. Note that your Maven dependencies on that should be set to "provided" (as in, already provided by the target container). Usually just the
javaee-apidependency is sufficient. It covers JSP, Servlet, EL, JSTL, JSF, CDI, EJB, etc..etc..See also: