struts.xml配置文件中result的語法:<result name="" type="">xxxxx</result> Struts2支持的不同類型的返回結果爲: Chain Result-->type="chain" 用來處理Action鏈 Dispatcher Result -->type="dispatcher" 用來轉向頁面,通常處理JSP FreeMarker Result -->type="freemarker" 處理FreeMarker模板 HttpHeader Result -->type="httpheader" 用來控制特殊的Http行爲 Redirect Result -->type="redirect" 重定向到一個URL Redirect Action Result -->type="redirectAction" 重定向到一個Action Stream Result -->type="stream" 向瀏覽器發送InputSream對象,通常用來處理文件下載 Velocity Result -->type="velocity" 處理Velocity模板 XLST Result -->type="xslt" 處理XML/XLST模板 PlainText Result -->type="plainText" 顯示原始文件內容,例如文件源代碼
struts.xml配置文件中result的語法:<result name="" type="">xxxxx</result>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
Struts 2 註解實現Action返回JSON數據
Cloud-Future
2018-08-27 19:44:39
Struts 2 Hello World
Cloud-Future
2018-08-27 19:44:37
使用 Struts 2標籤
Cloud-Future
2018-08-27 19:44:37
Locate 對 Struts2 Calendar Date 時間 賦值 的影響
ICNF
2018-08-27 19:37:10
Struts2學習
qq_1597310335
2018-08-27 19:27:18
OGNL和Struts2中的值棧
qq_1597310335
2018-08-27 19:27:18
Struts2的頁面參數獲取
qq_1597310335
2018-08-27 19:27:18
簡單的Struts2登陸
shenshuibomb
2018-08-27 18:06:51
struts2自主學習之DTD文件結構及各配置文件詳解
Leo_libin
2018-08-27 18:05:13
struts2基礎學習收錄重點之OGNL動態配置result , 使用註解配置action,實現java國際化
Leo_libin
2018-08-27 18:05:13
struts2自主學習之配置國際化資源文件,傳統異常處理方式, 攔截器,實現action 控制類,訪問servletAPI,使用攔截器註解
Leo_libin
2018-08-27 18:05:01
本人Struts2基礎學習收錄重點
Leo_libin
2018-08-27 18:05:00
在JS代碼中獲取Struts2中的返回值或者參數
iteye_6674
2018-08-27 17:44:18
Struts2第四篇【請求數據自動封裝、Action得到域對象】
A3384877125
2018-08-27 17:34:28
Struts2筆記之項目環境配置<一>
feilongjian1
2018-08-27 17:23:26