本文介绍了Java Spring 3.0.5与Apache Tiles 2.2.2集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
按照本教程操作:
标题配置(tile.xml):
Tiles configuration ( tiles.xml ) :
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
"http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
<tiles-definitions>
<definition name="base.definition"
template="/WEB-INF/jsp/layout.jsp">
<put-attribute name="title" value="" />
<put-attribute name="header" value="/WEB-INF/jsp/header.jsp" />
<put-attribute name="menu" value="/WEB-INF/jsp/menu.jsp" />
<put-attribute name="body" value="" />
<put-attribute name="footer" value="/WEB-INF/jsp/footer.jsp" />
</definition>
<definition name="contact" extends="base.definition">
<put-attribute name="title" value="Contact Manager" />
<put-attribute name="body" value="/WEB-INF/jsp/contact.jsp" />
</definition>
</tiles-definitions>
spring-servlet.xml
spring-servlet.xml
<context:component-scan base-package="hello.spring3.controller" />
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.tiles2.TilesView"/>
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp" />
</bean>
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/tiles.xml</value>
</list>
</property>
</bean>
当我运行它时,出现错误:
when i run it, i get error:http://pastebin.com/KY541YKD
可能是什么问题?如果您对其他文件/配置有任何疑问,请问我
what could be the problem? if you have any questions about other files/configuration, ask me
推荐答案
错误提示:
java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule
您似乎错过了。
这篇关于Java Spring 3.0.5与Apache Tiles 2.2.2集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!