1. 程式人生 > >測試struts2.0框架出現404錯誤! org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndEx

測試struts2.0框架出現404錯誤! org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndEx

[b]報錯資訊:java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter[/b]

[b]

[b]解決方案:[/b]
[color=red]struts.xml[/color]


<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-default.xml"/>
<package name="testStrutsPage" namespace="/test" extends="struts-default">
<action name="TestStrutsAction" class="com.jerry.action.TestStrutsAction" method="testStruts">
<result name="success" type="dispatcher">/test/testStruts.jsp</result>
</action>
</package>
</struts>




[/b]