---
title: "struts2  result type的值"
author: "wengsibo"
date: "2010-12-09T17:08:50Z"
tags: []
categories: ["企业架构"]
slug: "struts2-result-type"
draft: false
lastmod: "2010-12-09T17:08:50Z"
id: 837810
url: "https://wengsb.iteye.com/blog/837810"
---

Result类型

Webwork提供了一些com.opensymphony.xwork.Result接口的实现来使你的action可以容易的用户交互.这些Result类型包括:

Chain - 用于 Action Chaining 
Dispatcher - 用于 JSP 整合 
FreeMarker - 用于 FreeMarker 整合 
HttpHeader - 用于控制特殊的HTTP行为 
JasperReports - 用于 JasperReports 整合 
Redirect - 用于直接跳转到例外的URL 
redirect-action - 用于直接跳转到另外的action 
Stream - 用于向浏览器返回一个InputStream (一般用于文件下载) 
Velocity - 用于 Velocity 整合 
XSL - 用于 XML/XSLT 整合 
PlainText - 用于显示某个页面的原始的文本 (例如 jsp, html 等) 


如果要跳到不同命名空间下面的配置中则:
需要通过param进行设置
<result name="success" type="redirect-action">
<param name="namespace">/staff_web</param>
<param name="actionName">addStaffBusiness</param>	
</result>