struts中action中的update方法还有 带upda的方法名,都不执行,其他的save和delete都可以,这是为什么呢?
struts配置文件
<!-- 设置默认的执行的类 -->
<default-action-ref name="helloAction" />
<default-class-ref class="zq.day01.HelloAction" />
<action name="helloAction_*" class="zq.day01.HelloAction" method="{1}">
<result name="update">/jsp/update.jsp</result>
<result name="delete">/jsp/delete.jsp</result>
<result name="save">/jsp/save.jsp</result>
</action>
</package>
Action类:
public class HelloAction extends ActionSupport{
@Override
public String execute() throws Exception {
System.out.println("默认的类");
return "success";
}
public String test(){
System.out.println("执行ACtion");
return "test";
}
public String delete(){
System.out.println("delete");
return "delete";
}
public String save(){
System.out.println("save ");
return "save";
}
// 不执行??????
public String updateUI(){
System.out.println("update");
return "updateUI";
}
// 不执行??????
public String update(){
System.out.println("update");
return "update";
}
}
页面路径都没问题