Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to read TLD "META-INF/c.tld" from JAR file

I create a Spring MVC project from Spring template using the STS plugin. However when I run the application there's an error:

org.apache.jasper.JasperException: /WEB-INF/views/home.jsp(1,63) Unable to read TLD "META-INF/c.tld" from JAR file "file:/H:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/imgateway/WEB-INF/lib/jstl-1.2.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

Anyone have experienced this kind of issue?

like image 273
quarks Avatar asked Apr 25 '12 18:04

quarks


1 Answers

Asked a several times before on StackOverflow: Unable to read TLD "META-INF/c.tld"

I did blog a potential answer to this once: http://blog.flurdy.com/2010/07/jetty-tomcat-jsp.html

Depending on if your project uses maven you will need to ensure jsp-api is not included but provided by Tomcat instead by eg:

<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>servlet-api</artifactId>
   <version>2.5</version>
   <scope>provided</scope>
</dependency>
<dependency>
   <groupId>javax.servlet.jsp</groupId>
   <artifactId>jsp-api</artifactId>
   <version>2.1</version>
   <scope>provided</scope>
</dependency>
<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>jstl</artifactId>
   <version>1.2</version>
</dependency>
<dependency>
   <groupId>org.apache.tomcat</groupId>
   <artifactId>jasper-el</artifactId>
   <version>6.0.26</version>
</dependency>
like image 130
flurdy Avatar answered Oct 12 '22 22:10

flurdy