struts2 自定义action调用方法
一:在struts.xml中定义'method'属性
<action name="memberEdit" method="memberEdit" >/WEB-INF/adminjsp/memberEdit.jsp</result>
??? </action>
直接访问就行了http://localhost:8080/test/memberEdit.action
?
二:在<s:submit???name="method:xxxx" value="提交"/>中定义,xxxx为方法名.
三:访问Action时,在Action名后加上“!xxx”(xxx为方法名)。
例如:http://localhost:8080/test/memberEdit!meadd.action
但是这个方法却报错
There is no Action mapped for namespace / and action name memberQuery1
检查了下路径和action名都没错,不知道错在哪?
<result name="success" type="dispatcher">page_detail.jsp</result>