在执行action后返回input action时保留actionerror
来源:互联网 发布:做h5的软件 编辑:程序博客网 时间:2024/04/28 14:05
输入页面input.jsp需执行setDefaultValue.action给页面设置默认值,提交input.jsp的form会执行另外一个action:dosomeThing.action。在doSomething中有一个逻辑check,如果check失败需要返回input.jsp,准确来说是setDefaultValue.ation,而且要在页面打印action error。
如果配置为:
那么actonerror可以打印,但input.jsp不会有默认值。
如果配置为:
显而易见,有默认值,但丢失了actionerror。
有效的配置是:
指定默认拦截器栈不拦截setDefaultValue,
指定input type为chain,使得执行doSomething后,action error值仍然能够继续保留到下一个action中:
基础还是要好好学习滴......
参考Apache中对workflow拦截器的描述:http://struts.apache.org/2.0.11/docs/workflow-interceptor.html
The order of execution in the workflow is:
- If the action being executed implements Validateable, the action's Validateable#validate()validate method is called.
- Next, if the action implements ValidationAware, the action's ValidationAware#hasErrors()hasErrors method is called. If this method returns true, this interceptor stops the chain from continuing andimmediately returns Action#INPUT
- 在执行action后返回input action时保留actionerror
- ssh 项目中struts2 "input"返回后无法执行Action解决方法
- struts action 不执行,直接返回result input
- 整合Spring后,调用Action总是返回Input解决方案
- struts2两个input方法的action,出错后总是返回到Input页面的解决方法
- 执行完删除操作后提示alert后返回删除后的action
- ssh框架中,Struts2中返回默认值input,根本action都不执行
- struts2 提交表单后,不走action中的方法,直接返回input
- struts2 提交表单后,不走action中的方法,直接返回input
- Action返回值跳转到另一个Action继续执行
- struts2当前Action执行成功后跳转到另一个Action
- struts2当前Action执行成功后跳转到另一个Action
- struts2当前Action执行成功后跳转到另一个Action
- struts2首页跳转后执行action
- 关于Action中ValidateXXX方法校验一次失败后\导致以后一直返回input视图的情况
- struts2 文件上传时,某次上传失败之后的所有上传都返回input,不跳到action
- struts2 文件上传时,某次上传失败之后的所有上传都返回input,不跳到action
- 如何在Action里返回值 [收藏]
- 工作又一年
- 3阶魔方破解之层先法
- java基础
- 如何使用 U 盘启动 Windows 7??
- XP系统安装SQL Server 2005开发版具体过程与注意问题 收藏
- 在执行action后返回input action时保留actionerror
- Android 核心分析 之八------Android 启动过程详解
- Scrum中的风险管理(1)
- SOCKADDR 与 SOCKADDR_IN
- #pragam 简介
- Scrum中的风险管理(2)
- 基于Visual C++2010与windows7 sdk开发Windows7应用(4) 获取windows7字体并设置字体
- ARPSender by Refdom代码
- qtopia4.3