首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

【转】Struts2.0默许支持多种格式的result type

2012-09-06 
【转】Struts2.0默认支持多种格式的result typeaction nameattachment_* typestream//就是这个type

【转】Struts2.0默认支持多种格式的result type
<action name="attachment_*" type="stream">//就是这个type 是什么意思 ,这是一个下载的action
<param name="contentType">${contentType}</param>
<param name="inputName">${inputName}</param>
    <param name="contentDisposition">
     ${contentDisposition}
    </param>
    <param name="bufferSize">4096</param>
   </result>

---------------------------

type="chain"          不建议
type="dispatcher"     一般的资源
type="freemarker"     Freemarker模板
type="velocity"       Velocity模板
type="xslt"           XSLT模板
type="httpheader"     添加状态到Http头
type="redirect"       重定向
type="redirect-action"  重定向到Action
type="plaintext"        把原始内容输出(如jsp和html的原始内容)
type="stream"           把一般内容输出到流

热点排行