ITeye博客

Struts2 Action的返回结果类型

suhongliang5332 · 2013-01-25 11:39 · web企业开发 · Web前端 · Markdown

已配置结果类型名  类 名 描 述 dispatcher

org.apache.struts2.dispatcher.Se

rvletDispatcherResult

默认结果类型,用来呈现JSP页面 chain

com.opensymphony.xwork2.Actio

nChainResult

将action和另外一个action链接起来 freemarker

org.apache.struts2.views.freemar

ker.FreemarkerResult

呈现Freemarker模板 httpheader

org.apache.struts2.dispatcher.Htt

pHeaderResult

返回一个已配置好的HTTP头信息响应 redirect

org.apache.struts2.dispatcher.Se

rvletRedirectResult

将用户重定向到一个已配置好的URL redirectAction

org.apache.struts2.dispatcher.Se

rvletActionRedirectResult

将用户重定向到一个已定义好的action stream

org.apache.struts2.dispatcher.St

reamResult

将原始数据作为流传递回浏览器端,该结果类型对下载的内容和图片非常有用 velocity

org.apache.struts2.dispatcher.Ve

locityResult

呈现Velocity模板 xslt

org.apache.struts2.views.xslt.XSL

TResult

呈现XML到浏览器,该XML可以通过XSL模板进行转换 plaintext

org.apache.struts2.dispatcher.Pl

ainTextResult

返回普通文本类容

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。