Struts2 关于返回type="chain"的用法.
2012-02-17 20:49
405 查看
见到struts.xml当中有这么个配置 <actionname="addCritique"class="addCritique"> <resultname="success"type="chain">showArticle</result> </action> 这个type="chain"是什么意思呢?
功能与redirect的action转发类似,不过与redirectaction转发功能不同的是它可以将Action中的数据一直保存在同一个HTTP请求中。Struts2支持的不同类型的返回结果为:[/code]
ChainResult-->type="chain"用来处理Action链
DispatcherResult-->type="dispatcher"用来转向页面,通常处理JSPFreeMarker
Result-->type="freemarker"处理FreeMarker模板HttpHeader
Result-->type="httpheader"用来控制特殊的Http行为Redirect
Result-->type="redirect"重定向到一个URLRedirectAction
Result-->type="redirectAction"重定向到一个ActionStream
Result-->type="stream"向浏览器发送InputSream对象,通常用来处理文件下载Velocity
Result-->type="velocity"处理Velocity模板XLSTResult-->type="xslt"处理XML/XLST模板PlainText
Result-->type="plainText"显示原始文件内容,例如文件源代码另外第三方的result类型还包括JasperReportsPlugin,专门用来处理JasperReport类型的报表输出。
相关文章推荐
- Struts2 关于返回type="chain"的用法.
- Struts2 关于返回type="chain"的用法
- Struts2 type="chain"的用法详细解释
- struts2 type="chain" 用法
- struts2 用type="chain" 的跳转出错sendError() forbidden after buffer has been committed.
- 关于struts2的xml中<result type="redirect">参数问题
- Struts2 result type="stream"的用法
- struts2 配置文件详解 type="stream chain dispatcher、redirect(redirect-action)"
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- 上struts2的xml在<result type="redirect">参数问题
- 关于[[NSBundle mainBundle] pathForResource:@"name" ofType:@"type"]找不到指定文件的解决办法
- 关于jsp中<input type="file">获取路径问文件名,获取完全路径问题
- 关于<input type="text">不能显示空格的问题
- 关于php的 header("Cache-control: private");用法~
- 关于struts2 中result type="stream"
- 关于jstl EL用法的注意点(java.lang.NumberFormatException: For input string: "userName")
- 关于js中"window.location.href"、"location.href"、"parent.location.href"、"top.location.href"的用法
- 关于enctype="multipart/form-data" ,后台request.getParameterMap()
- <input type="image"> 和 <img> 用法区别
- Struts中type="chain"的用法!