struts.xml配置文件中result的语法:<result name="" type="">xxxxx</result>

struts.xml配置文件中result的语法:<result name="" type="">xxxxx</result>

Struts2支持的不同类型的返回结果为:

Chain Result-->type="chain"
用来处理Action链

Dispatcher Result -->type="dispatcher"
用来转向页面,通常处理JSP

FreeMarker Result -->type="freemarker"
处理FreeMarker模板

HttpHeader Result -->type="httpheader"
用来控制特殊的Http行为

Redirect Result -->type="redirect"
重定向到一个URL

Redirect Action Result -->type="redirectAction"
重定向到一个Action

Stream Result -->type="stream"
向浏览器发送InputSream对象,通常用来处理文件下载

Velocity Result -->type="velocity"
处理Velocity模板

XLST Result -->type="xslt"
处理XML/XLST模板

PlainText Result -->type="plainText"
显示原始文件内容,例如文件源代码
posted @ 2012-11-03 17:04  java程序员-c  阅读(344)  评论(0编辑  收藏  举报