Struts2 注解中跳转 action
来源:互联网 发布:法兰克编程教学 编辑:程序博客网 时间:2024/05/18 02:29
@Results({
@Result(name = "toEditFollow", type = "redirect", location = "follow!toEditFollow?baseId=${baseInfo.baseId}&&flag=${flag}")})
public String updateOutTime() throws ParseException {
//相关操作后
return "toAddFollow";
}
这里面要注意的几点是:
1、chain是不可以跳转其他action中的方法的,必须使用redirect
2、使用redirect要丢失之前的各种参数,需要重新传递,传递时可以使用EL表达式
附上xml中返回值的类型,这和注解中其实是一样的
chain
用来处理Action链,被跳转的action中仍能获取上个页面的值,如request信息。
com.opensymphony.xwork2.ActionChainResult
dispatcher
用来转向页面,通常处理JSP
org.apache.struts2.dispatcher.ServletDispatcherResult
redirect
重定向到一个URL?,被跳转的页面中丢失传递的信息,如request
org.apache.struts2.dispatcher.ServletRedirectResult
redirectAction
重定向到一个Action?,跳转的页面中丢失传递的信息,如request
org.apache.struts2.dispatcher.ServletActionRedirectResult
redirect-action
重定向到一个Action?,跳转的页面中丢失传递的信息,如request
org.apache.struts2.dispatcher.ServletActionRedirectResult?
//以下不常用
freemaker
处理FreeMarker模板
org.apache.struts2.views.freemarker.FreemarkerResult
httpheader
控制特殊HTTP行为的结果类型
org.apache.struts2.dispatcher.HttpHeaderResult
stream?
向浏览器发送InputSream对象,通常用来处理文件下载,还可用于返回AJAX数据
org.apache.struts2.dispatcher.StreamResult
velocity
处理Velocity模板
org.apache.struts2.dispatcher.VelocityResult
xslt
处理XML/XLST模板
org.apache.struts2.views.xslt.XSLTResult
plainText
显示原始文件内容,例如文件源代码
org.apache.struts2.dispatcher.PlainTextResult
plaintext
显示原始文件内容,例如文件源代码
org.apache.struts2.dispatcher.PlainTextResult?
- Struts2 注解中跳转 action
- Struts2 注解中跳转 action
- Struts2 注解中跳转 action
- Struts2 Action中跳转Action
- Struts2 Action中跳转Action
- struts2注解注入action-action跳转到另一action
- 基于注解的Struts2 的 @action跳转
- struts2中action的跳转
- Struts2的convention插件,在步骤中使用Action注解跳转到其他jsp页面
- struts2使用注解配置Action之间的跳转
- 基于struts2 通过注解跳转到后台action的方法
- struts2中action之间的跳转
- Struts2 中action之间的跳转
- Struts2中action之间的跳转问题
- Struts2中Action的跳转方式
- Struts2 中action之间的跳转(分享)
- struts2框架中Action内部跳转
- Struts2中action之间的跳转
- mysqld服务器系统变量和状态变量
- mysql SQL服务器模式
- mysql 账户管理
- 关于SharedPreferences中无法改变Set的问题。
- Cardboard虚拟现实开发初步(三)
- Struts2 注解中跳转 action
- C程序的编译和链接
- 剑指Offer面试题18(Java版):树的子结构
- 如此抄袭Apps之OscHub(一)
- HttpClient使用详解
- MAT使用及OOM分析
- 3Sum Closest
- MeasureSpec学习
- JSP和El表达式和JSTL标签库使用