【原创】Struts2.5.12版本中使用通配符*

ι 版权声明:本文为博主原创文章,未经博主允许不得转载。

【原创】Struts2.5.12版本中使用通配符*

<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>

【原创】Struts2.5.12版本中使用通配符*

<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>

【原创】Struts2.5.12版本中使用通配符*

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)
………
上一篇:采用jmeter测试dubbo服务接口


下一篇:JavaScript escape() 函数