struts.xml配置文件中result的语法:xxxxx
Struts2支持的不同类型的返回结果为:
Chain Result-->type="chain"
用来处理Action链,把相关的几个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"
显示原始文件内容,例如文件源代码
转载于:https://blog.51cto.com/yuehaoyisheng/1219026