将上下文初始化事件发送到图块中的侦听器实例时发生异常
我第一次使用瓷砖(2.0)。我在 web.xml 中编写了以下代码,
<context-param>
<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINTION_CONFIG</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>
<listener>
<listener-class>org.apache.tiles.web.startup.TilesListener</listener-class>
</listener>
我在 WEB-INF 文件夹中创建了tiles,xml。当我部署该项目时,它给出了一个异常,说明
Exception **sending context initialized event to listener instance of class org.apache.tiles.web.startup.TilesListener
java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule**
我不明白发生了什么以及为什么。
i am using tiles (2.0) for the first time. i wrote the following code in web.xml
<context-param>
<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINTION_CONFIG</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>
<listener>
<listener-class>org.apache.tiles.web.startup.TilesListener</listener-class>
</listener>
I created tiles,xml in WEB-INF folder. when i deploy the project it gives an exception stating
Exception **sending context initialized event to listener instance of class org.apache.tiles.web.startup.TilesListener
java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule**
I did not understand what is happening and why.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您显然缺少 Commons Digester。您是否将所有依赖项放入 WEB-INF/lib 目录中?
You are obviously missing Commons Digester. Did you put all dependencies in your WEB-INF/lib directory?
因为任何人仍然在寻求答案。 apetrelli 的解决方案对我来说效果很好。将 Commons Digester jar 导入到您的库中。
For anyone still seeks the answer. apetrelli's solution worked fine for me. Import Commons Digester jar to your lib.