日期:2014-05-18  浏览次数:20758 次

struts2 的convention插件问题
书上说convention不用配置任何xml文件,然后我把web.xml删除后提示找不到dispatcher,因为用了tag标签,然后加入filter后,又提示找不到resource,是什么原因?

filter

        <filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

错误信息The requested resource is not available.

------解决方案--------------------
web.xml
必须有的吧。