Spring 3 MVC and Apache Tiles 2 Integration Error

后端 未结 9 902
庸人自扰
庸人自扰 2021-01-04 06:15

I have been trying to integrate Spring (3.0.4 and 3.0.5) MVC with Apache Tiles (2.1.2,2.1.4 and 2.2.2) to no avail. In every case i get the following error:

java.lan

相关标签:
9条回答
  • 2021-01-04 06:21

    For tiles 3, you should add

    tiles-request.jar, commons-digester.jar

    0 讨论(0)
  • 2021-01-04 06:24

    For tiles 3, use class org.springframework.web.servlet.view.tiles3.TilesConfigurer. Make sure you have that in spring webmvc.

    0 讨论(0)
  • 2021-01-04 06:25

    If you are using maven then you can add this dependency in order to solve the problem:

    <dependency>
         <groupId>org.apache.tiles</groupId>
         <artifactId>tiles-servlet</artifactId>
         <version>2.2.2</version>
    </dependency>  
    
    0 讨论(0)
  • 2021-01-04 06:34

    I could only solve this after I added dependency to be provided at compile time in my POM

    <scope>compile</scope>
    
    0 讨论(0)
  • 2021-01-04 06:40

    org.apache.tiles.startup.BasicTilesInitializer is a class of tiles-core(2.2.1).jar. Check that you have deployed the tiles-core jar

    0 讨论(0)
  • 2021-01-04 06:40

    I'm not going to apologize for reviving a stale thread.

    I have a Spring MVC project built in Eclipse Helios.
    I shut down Helios for a few days, then reopened it today. When I ran my app, I got the same exception as above: java.lang.NoClassDefFoundError: org/apache/tiles/startup/BasicTilesInitializer.

    My solution was to clean the deploy directory on the integrated Tomcat server, then re-deploy the app. The first time I redeployed, my app's lib dir showed only two jars. So after cleaning and redeploying again, it then got all the necessary jar's and now my app runs again. Go figure.

    0 讨论(0)
提交回复
热议问题