这让我疯了。这可能是之前被问到的......但
我最近开始使用Tapestry进行Hibernate-Spring-Tapestry项目。我在Hibernate / Tapestry中使用了maven原型,然后添加了Spring集成,但这比我想象的还要多。
目前我坚持这个,在添加了正确的tapestry-spring集成依赖项之后,在更改/WEB-INF/web.xml中的过滤器后,我无法运行jetty。这是因为它无法找到/WEB-INF/applicationContext.xml,主要是因为我的项目中没有该文件。
我只是想知道它应该包含什么,所以我可以继续我的下一个noob错误。
编辑:我用
替换了默认的Tapestry5过滤器<filter>
<filter-name>app</filter-name>
<filter-class>org.apache.tapestry5.spring.TapestrySpringFilter</filter-class>
</filter>
完整的web.xml - &gt; http://pastebin.com/KgPTDrmC
答案 0 :(得分:1)
TapestrySpringFilter
的工作原理是检索由WebApplicationContext
创建并初始化的ContextLoaderListener
(您也应该拥有)。 applicationContext.xml
文件是一个Spring XML bean声明文件,ContextLoaderListener
可以用来创建WebApplicationContext
。
进入它的bean取决于你的应用程序。