开发者

How to run Spring Samples?

开发者 https://www.devze.com 2023-01-10 12:26 出处:网络
I check out mvc-ajax project into eclipse from this svn address https://src.springframework.org/svn/spring-samples

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.apac开发者_JAVA技巧he.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)


Eclipse: Build Path -> Configure Build Path -> Libraries -> Add Library -> Server Runtime. Then choose your server.


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


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...


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


I think I found a solution to the problem you were facing, while trying to solve mine.

This post proposes to comment the following dependences (due to problems with eclipse):

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

Kind Regards,
Despot


Even I too was facing the same problem while deploying into tomcat 6 server. I solved it by copying the jstl-1.2.jar into tomcat lib folder and solved.

0

精彩评论

暂无评论...
验证码 换一张
取 消