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

I am creating a Spring MVC project from a Spring template using the STS plugin. However, when starting the application, an error appears:

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

Has anyone experienced such a problem?

+5
source share
5 answers

I came across the same situation, and I understand that the error is being thrown, obviously, because something went wrong with the JSTL. Because STS templates rely on Maven2, you need to manually remove the JSTL artifact from your local Maven2 repository .

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

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

. STS, , . Maven2 . , /, .

+5

StackOverflow: TLD "META-INF/c.tld"

: http://blog.flurdy.com/2010/07/jetty-tomcat-jsp.html

, maven, , jsp-api , Tomcat , :

<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>
+12

javax.servlet.jsp.jar webapp, tomcat: P

, javax.servlet.jsp.jar WEB-INF/lib, .

+5

With Eclipse, make sure you install 'Maven Integration for Eclipse WTP With another non-WTP plugin, eclipse will change your class path and enable servlet-api.jar in your web applications.

+1
source

The same default comes with me today. This is an error caused by servlet-api.jarand jsp-api.jar, and you may need these two in your code development, so make sure they appear in your pom.xml with the provided. It looks great with me

<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>
0
source

All Articles