当我操作了一个方法后,返回SUCCESS时,好像一直都是执行的execute中指定的success跳转地址list.jsp
比如我执行了test!edit.action,本来返回success的话,就应该跳转到edit.jsp页面,可偏偏跳转的是list.jsp
这是为什么呢?
下面是我的类:public class TestAction extends ActionSupport { 。
@Autowired
。。(省略) @Action(value = "/test", results = {
@Result(name = "success", location = "/list.jsp"),
@Result(name = "input", location = "/failure.jsp") })
public String execute() throws Exception {
return SUCCESS;
}

@Action(value = "/test", results = {
@Result(name = "success", location = "/list.jsp"),
@Result(name = "input", location = "/failure.jsp") })
public String list() throws Exception {
return SUCCESS;
}
@Action(value = "/test", results = {
@Result(name = "success", location = "/save.jsp"),
@Result(name = "input", location = "/add.jsp") })
// type="ActionChainResult.class", prams={"method","list"}
public String save() throws Exception {
return SUCCESS;
}
@Action(value = "/test", results = {
@Result(name = "success", location = "/del.jsp"),
@Result(name = "input", location = "/failure.jsp") })
public String del() throws Exception {
return SUCCESS;
}
@Action(value = "/test", results = {
@Result(name = "success", location = "/edit.jsp"),
@Result(name = "input", location = "/failure.jsp") })
public String edit() throws Exception {
return SUCCESS;
}}