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

17,997

Solution 1

I was facing with the same situation and I realize that the error is thrown, obviously, because something went wrong with JSTL. Since, STS templates rely on Maven2, you should need to manually delete the JSTL artifact from your local Maven2 repository.

In Windows 7: Delete the folder c:\Users\<Username>\.m2\repository\javax\servlet\jstl\.

In Linux: Delete the folder /home/<Username>/.m2/repository/javax/servlet/jstl/

Note: This is not the fault of STS, it just happens when an artifact was corrupted while being downloaded from the Internet. Deleting the arfifact will force Maven2 to re-download it. Finally, it could happen with any artifact/file downloaded from the web.

Solution 2

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>

Solution 3

do NOT package javax.servlet.jsp.jar with your webapp, it confuses tomcat :P

We were getting the exact same error, removing javax.servlet.jsp.jar from the WEB-INF/lib sorted it

Solution 4

With Eclipse, please assure that you installed 'Maven Integration for Eclipse WTP ' With the other plugin without WTP, eclipse change your classpath and include servlet-api.jar in your webapps.

Share:
17,997
quarks
Author by

quarks

Updated on June 13, 2022

Comments

  • quarks
    quarks almost 2 years

    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?