tags:

views:

99

answers:

3

I check out mvc-ajax project into eclipse from this svn address https://src.springframework.org/svn/spring-samples and run it on server,but got the following error:

org.apache.jasper.JasperException: Unable to read TLD "META-INF/c.tld" from JAR file "file:/home/tom/source/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mvc-ajax/WEB-INF/lib/jstl-1.2.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:181) at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:182) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:383) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:446)

A: 

You are missing the c.tld taglib. Make sure you deploy it.

thelost
do you mean jstl-1.2.jar? I can find it in the right folder,and I can find the c.tld file in the jar package.
Tom
What Java version is you JAVA_HOME pointing to ?
thelost
I set it in /etc/enviromentPATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java/jdk1.6.0_21/bin"CLASSPATH=.:/usr/lib/jvm/java/jdk1.6.0_21/libJAVA_HOME=/usr/lib/jvm/java/jdk1.6.0_21
Tom
looks good, I would then remove all TLD path info from web.xml and let tomcat auto-discover the TLDs
thelost
There is no tld declare in web.xml. :(
Tom
A: 

I was unable to reproduce this problem so this is a shot in the dark, but I often find I can fix unexpected deployment issues by cleaning my tomcat instance in Eclipse. Right click tomcat in your Servers view, and select Clean...

James Earl Douglas
Could you explain how do you run this demo?
Tom
A: 

I can fix this issue by remove jsp-api.jar. Not sure this is the best solution

Tom