您的位置:首页 > 编程语言 > Java开发

struts2 struts.xml result type 属性的说明

2014-06-18 11:23 501 查看
dispatcherorg.apache.struts2.dispatcher.默认结果类型,用来呈现JSP页面
ServletDispatcherResult
chaincom.opensymphony.xwork2.将action和另外一个action链接起来
ActionChainResult
freemarkerorg.apache.struts2.views.freemarker.呈现Freemarker模板
FreemarkerResult
httpheaderorg.apache.struts2.dispatcher.返回一个已配置好的HTTP头信息响应
HttpHeaderResult
redirectorg.apache.struts2.dispatcher.将用户重定向到一个已配置好的URL
ServletRedirectResult
redirectActionorg.apache.struts2.dispatcher.将用户重定向到一个已定义好的action
ServletActionRedirectResult
streamorg.apache.struts2.dispatcher.将原始数据作为流传递回浏览器端,
StreamResult该结果类型对下载的内容和图片非常有用
velocityorg.apache.struts2.dispatcher.呈现Velocity模板
VelocityResult
xsltorg.apache.struts2.views.xslt.呈现XML到浏览器,
XSLTResult该XML可以通过XSL模板进行转换
plaintextorg.apache.struts2.dispatcher.返回普通文本类容
PlainTextResult
type="redirect"的值可以转到其它命名空间下的action,而redirect-action只能转到同一命名空下的action,因此它可以省略.do的后缀直接写action的名称.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: