运行spring 3 mvc-basic样本的问题 [英] Problem running Spring 3 mvc-basic sample
问题描述
我正在尝试使用Spring 3.6开始使用Eclipse 3.6和Spring STS。我也安装了m2eclipse。
我已经签出并导入了Spring3 mvc-basic示例应用程序。
当我尝试运行它(通过eclipse / run /在服务器上运行)我在tomcat上的webapp启动中收到一些错误,这些都与jstl1.2有关.jar:
org.apache.jasper.JasperException:无法从JAR读取TLDMETA-INF / c.tld文件文件:/home/myname/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mvc-basic/WEB-INF/lib/jstl-1.2.jar:org。 apache.jasper.JasperException:无法加载或实例化TagLibraryValidator类:org.apache.taglibs.standard.tlv.JstlCoreTLV
但是:
jar -tf /home/myname/workspace/.metadata/.plugins/org.eclipse。 wst.server.core / tmp0 / wtpwebapps / mvc-basic / WEB-INF / lib / jstl-1.2.jar | grep c.tld
收益:
META-INF / c.tld
所以我很难理解错误
任何帮助非常感谢。
Rob
似乎在从eclipse运行项目时有问题。解决方案是注释pom.xml中的以下库 - servet-api 和 jsp-api 。使用tomcat 6和7进行测试
< dependency>
< groupId> javax.servlet< / groupId>
< artifactId> servlet-api< / artifactId>
< version> 2.5< / version>
< scope>已提供< / scope>
< / dependency>
<依赖关系>
< groupId> javax.servlet.jsp< / groupId>
< artifactId> jsp-api< / artifactId>
< version> 2.1< / version>
< scope>已提供< / scope>
< / dependency>
I am trying to get started with Spring 3, using Eclipse 3.6 and Spring STS. I have also installed m2eclipse. I have checked out and imported the Spring3 mvc-basic sample app.
When I try to run it (via eclipse/run/run on server) I get a number of errors in the webapp startup on tomcat, all relating to jstl1.2.jar:
org.apache.jasper.JasperException: Unable to read TLD "META-INF/c.tld" from JAR file "file:/home/myname/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mvc-basic/WEB-INF/lib/jstl-1.2.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
However:
jar -tf /home/myname/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mvc-basic/WEB-INF/lib/jstl-1.2.jar |grep c.tld
Yields:
META-INF/c.tld
So I am having difficulty in understanding the error
Any help greatly appreciated.
Rob
It seems that there is problem when running project from eclipse. The solution is to comment following libraries in pom.xml - servet-api and jsp-api. Tested both with tomcat 6 and 7
<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>
这篇关于运行spring 3 mvc-basic样本的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!