struts2.xml中的result type屬性說明

已遷移到新家:小窩【http://www.myzuji.cn/article/14.html】

1、chain:用來處理Action鏈,被跳轉的Action中仍能獲取上個頁面的值,如request信息。

                    所在類——com.opensymphony.xwork2.ActionChainResult

2、dispatcher:用來轉向頁面,通常處理JSP。

                              所在類——org.apache.struts2.dispatcher.ServletDispathcerResult

3、freemaker:處理FreeMarker模板。

                             所在類——org.apache.struts2.views.freemarker.FreemarkerResult

4、httpheader:控制特殊HTTP行爲的結果類型。

                              所在類——org.apache.struts2.dispatcher.HttpHeaderResult

5、stream:向瀏覽器發送InputStream對象,用來處理文件下載,還可用於返回AJAX數據

                       所在類——org.apache.struts2.dispatcher.VelocityResult

6、velocity:處理Velocity模板

                       所在類——org.apache.struts2.dispatcher.VelocityResult

7、xsl:處理XML/XLST模板

               所在類——org.apache.struts2.views.xslt.XSLTResult

8、plianText:顯示原始文件內容例如文件源代碼

                            所在類——org.apache.struts2.dispatcher.PlainTextResult

10、redirect:重定向到一個URL,被跳轉的頁面中丟失傳遞的信息,如request

                         所在類——org.apache.struts2.dispatcher.ServletActionRedirectResult

11、redirect-action:重定向到一個Action,跳轉的頁面中丟失傳遞的信息,如request

                                     所在類——org.apache.struts2.dispatcher.ServletActionRedirectResult

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章