struts2配置问题
eclipse启动tomcat报错
严重: Exception starting filter struts2
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher
在web.xml里FilterDispatcher的配置
<display-name>Struts2 configuration</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
搜索更多相关主题的帖子:
web filter apache java org
----------------解决方案--------------------------------------------------------
<display-name>Struts2 configuration</display-name>
<filter>
<filter-name>struts2</filter-name> -- 这里应该是你的实现在的名字
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> -- 这里指定你的实现类所在的类
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
看看是不是所用到的以有导进来....
[此贴子已经被作者于2007-11-2 16:34:34编辑过]
----------------解决方案--------------------------------------------------------
导包了
struts2-core-2.0.1.jar
xwork-2.0-beta-1.jar
----------------解决方案--------------------------------------------------------
我每次写的时候都是这么写的:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
不知道与上面两位写的:
<url-pattern>*.action</url-pattern>
有什么区别.
----------------解决方案--------------------------------------------------------
4楼正解
----------------解决方案--------------------------------------------------------