当我操作了一个方法后,返回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;
}}
比如我执行了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;
}}
解决方案 »
- hibernate 的 sum 求和报错~!
- Substance水印问题?
- spring配置文件中,我想直接注入一个普通的类,怎么实现了??????
- 寻求一个稳定好用的HibernateUtil
- 怎么在上传的图片的input框中显示路径 十万火急急急!!!!!
- 读取XML文件时出现 组件类型未声明 错误(急)
- 请推荐一些开源的绘制统计图的工具。(最好Java)
- PreparedStatement如何处理动态order,group by的问题?
- Hibernate 的问题?
- 高分求救XML的问题!!!
- ERP系统寻求团队或个人合作
- MyEclipse6.0启动的奇怪问题 大家都帮我看看吧 O(∩_∩)O谢谢
@Result(name = "success", location = "/list.jsp"),
@Result(name = "input", location = "/failure.jsp") })
public String execute() throws Exception {
return SUCCESS;
}此方法省略。