ι 版权声明:本文为博主原创文章,未经博主允许不得转载。
<package name="hellodemo" extends="struts-default" namespace="/">
<global-allowed-methods>regex:.*</global-allowed-methods>
<action name="hello_*" class="com.bella.struts201.action.HelloAction" method="{1}">
<result name="welcome">welcome.jsp</result>
</action>
</package>
<package name="hellodemo" extends="struts-default" namespace="/"> <action name="hello_*" class="com.bella.struts201.action.HelloAction" method="{1}"> <result name="welcome">welcome.jsp</result> <allowed-methods>add,update,delete,execute</allowed-methods> </action> </package>
ERROR Dispatcher Could not find action or result: /struts201/hello_add.action There is no Action mapped for namespace [/] and action name [hello_add] associated with context path [/struts201]. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:198) at org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:62) at org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37) at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58) ………