无法读取TLD"META-INF/c.tld". [英] Unable to read TLD "META-INF/c.tld"

查看:284
本文介绍了无法读取TLD"META-INF/c.tld".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去的几天里,JSTL一直存在这个问题.感谢您的帮助.

there's this issue with JSTL I'm stuck with for the past couple of days. Any help is appreciated.

Tomcat 6.0.28
Eclipse:Helios

Tomcat 6.0.28
Eclipse: Helios

pom.xml:

 <dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>jstl</artifactId>
   <version>1.1.2</version>
 </dependency>
 <dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>servlet-api</artifactId>
  <version>2.4</version>
  <scope>provided</scope>
</dependency>
<dependency>   
  <groupId>taglibs</groupId> 
  <artifactId>standard</artifactId> 
  <version>1.1.2</version> 
</dependency>
<dependency>   
  <groupId>javax.servlet.jsp</groupId> 
  <artifactId>jsp-api</artifactId> 
  <version>2.0</version>
  <scope>provided</scope>
</dependency>

JSP:

<%@ page session="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="utilfn" uri="/utility-functions" %>

web.xml:

<web-app id="WebApp_ID" version="2.4" 
 xmlns="http://java.sun.com/xml/ns/j2ee" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

当我使用管理器将Maven构建的war部署在tomcat 6上时,它工作正常. 当我在Eclipse中以运行方式>在服务器上运行"方式运行它时,我得到了:

When I deploy the Maven-built war on tomcat 6 using the manager it works fine. When I run it as "Run As > Run On Server" inside eclipse, I get this:

无法从JAR文件"file:/<-位置->/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/中读取TLD"META-INF/c.tld" Myproject/WEB-INF/lib/standard-1.1.2.jar:org.apache.jasper.JasperException:无法加载或实例化TagLibraryValidator类:org.apache.taglibs.standard.tlv.JstlCoreTLV

Unable to read TLD "META-INF/c.tld" from JAR file "file:/<- location ->/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Myproject/WEB-INF/lib/standard-1.1.2.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

无论我在哪里看,它都会说同样的话:

Wherever I look, it says the same thing:

  1. 确保servlet-api和jsp-api不在lib中
  2. 确保使用正确的JSTL版本和JSP 2.0附带的URI.

它们似乎很好,因为我可以独立部署战争.那这里怎么了!?

And they seem to be fine as I can deploy the war independently. So what's wrong here!?

推荐答案

检查 .metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Myproject/WEB-INF/lib/standard-1.1.2.jar没有损坏(并根据需要进行一些清理).

Check that .metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Myproject/WEB-INF/lib/standard-1.1.2.jar is not corrupted (and do some cleanup if required).

这篇关于无法读取TLD"META-INF/c.tld".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆