开发者

Problem running Spring 3 mvc-basic sample

开发者 https://www.devze.com 2023-01-22 07:50 出处:网络
I am trying to get started with Spring 3, using Eclipse 3.6 and Spring STS. I have also installed m2eclipse.

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开发者_如何学Python 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>
0

精彩评论

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

关注公众号