wzf7065
2013-08-07 11:24 阅读 217
已采纳

spring mvc集成tiles的问题

我在spring-servlet里配置的内容:

[code="java"]




org.springframework.web.servlet.view.tiles2.TilesView









/WEB-INF/tiles.xml





[/code]

启动Tomcat时报错的错误堆栈:
[code="java"]

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesConfigurer' defined in ServletContext resource [/WEB-INF/config/spring-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.view.tiles2.TilesConfigurer]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/tiles/servlet/context/wildcard/WildcardServletTilesApplicationContextFactoryCaused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.view.tiles2.TilesConfigurer]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/tiles/servlet/context/wildcard/WildcardServletTilesApplicationContextFactory
[/code]

我打开tiles-servlet.jar包看了下,里面并没有WildcardServletTilesApplicationContextFactory这个类,不知道是怎么回事,总报这个错呢?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    QiangGe2Dai QiangGe2Dai 2013-08-07 11:43

    更换tiles-servlet.jar

    点赞 评论 复制链接分享
  • zyn010101 zyn010101 2013-08-07 13:16

    去www.findjar.com或者www.jarvana.com搜索org/apache/tiles/servlet/context/wildcard/WildcardServletTilesApplicationContextFactory,下载jar包替换系统中的jar

    点赞 评论 复制链接分享

相关推荐