cannot find the tag library descriptor for http //java.sun.com/jsp/jstl/core
Problem :
We come across this common exception when we are using jsp's with tag libraries.
Exception I Encountered Was :
#########################################################################################
cannot find the tag library descriptor for http //java.sun.com/jsp/jstl/core#########################################################################################
Solution :
This exception was caused when i did not add the jstl.jar to my class path. I was using maven, so had to include it in my dependency and update web.xml file as explained below.
Example :
- General class path :
configure the exact path in the Environment Variable for classpath
- Maven Dependency :
<dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency>
- Web.xml :
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
Similar Exception :
- cannot find the tag library descriptor for http //java.sun.com/jsp/jstl/core
No comments:
Post a Comment