<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Redirect Action Result

    Redirect Action Result : This redirect pattern is supported by Struts 2. The ActionMapper provided by the ActionMapperFactory is used to redirect the browser to a URL that invokes the specified action. You can see a simple implementation of this in the following struts 2 application.?

    Redirects Dynamic Parameters: The action-redirect result takes following parameters:

    • actionName
    • namespace
    • method
    • encode
    • parse
    • location
    • prependServletContext


    parameters ------------

  • actionName (default) - the name of the action that will be redirect to

  • namespace - used to determine which namespace the action is in that we're redirecting to . If namespace is null, this defaults to the current namespace

    ?

    <package?name="public"?extends="struts-default">
    ????
    <action?name="login"?class="">
    ????????
    <!--?Redirect?to?another?namespace?-->
    ????????
    <result?type="redirect-action">
    ????????????
    <param?name="actionName">dashboard</param>
    ????????????
    <param?name="namespace">/secure</param>
    ????????
    </result>
    ????
    </action>
    </package>

    <package?name="secure"?extends="struts-default"?namespace="/secure">
    ????
    <--?Redirect?to?an?action?in?the?same?namespace?-->
    ????
    <action?name="dashboard"?class="">
    ????????
    <result>dashboard.jsp</result>
    ????????
    <result?name="error"?type="redirect-action>error</result>
    ????</action>

    ????<action?name="
    error"?class="">
    ????????
    <result>error.jsp</result>
    ????
    </action>
    </package>

    <package?name="passingRequestParameters"?extends="struts-default"?namespace="/passingRequestParameters">
    ???
    <--?Pass?parameters?(reportType,?width?and?height)?-->
    ???
    <!--
    ???The?redirect-action?url?generated?will?be?:
    ???/genReport/generateReport.action?reportType=pie&width=100&height=100
    ???
    -->
    ???
    <action?name="gatherReportInfo"?class="">
    ??????
    <result?name="showReportResult"?type="redirect-action">
    ?????????
    <param?name="actionName">generateReport</param>
    ?????????
    <param?name="namespace">/genReport</param>
    ?????????
    <param?name="reportType">pie</param>
    ?????????
    <param?name="width">100</param>
    ?????????
    <param?name="height">100</param>
    ??????
    </result>
    ???
    </action>
    </package>
  • 例如
  • <param name="轉發的action的成員名">${被轉發的action中變量}</param>
    ???<param name="fileName">${fileName}</param>

    posted on 2009-04-26 22:59 luofeng225 閱讀(449) 評論(0)  編輯  收藏 所屬分類: Struts2

    <2009年4月>
    2930311234
    567891011
    12131415161718
    19202122232425
    262728293012
    3456789

    導航

    統計

    公告

    我曾經聽到這么一個故事: 一個年輕的程序員問一個老程序員(一個比較牛逼的公司的CTO) 年輕程序員: 你為什么這么牛X., 就好像沒有你不會的。老程序員: 積累的。年輕程序員: 怎么才能積累到您的程度呢。我每天都在積累。但是似乎都沒有感覺到進步。老程序員: 我從20歲開始做到了一件事情,直到今天,而且盡可能地保證不間斷。年輕程序員: 到底是什么? 老程序員: 我每天保證自己有2個小時在學習新的東西。

    常用鏈接

    留言簿(3)

    隨筆分類

    隨筆檔案

    文章分類

    相冊

    收藏夾

    Java Website

    java技術博客

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 中文字幕亚洲综合小综合在线| 一级毛片a免费播放王色| 日本一区二区免费看| 中文字幕精品亚洲无线码一区应用| 亚洲片国产一区一级在线观看| 国产亚洲人成网站在线观看不卡| 内射干少妇亚洲69XXX| 日本免费中文视频| 亚洲AV乱码久久精品蜜桃| 亚洲欧洲免费视频| 亚洲日韩中文字幕| 我想看一级毛片免费的| 亚洲av永久无码精品网址| 日韩中文字幕在线免费观看| 亚洲国产精品美女久久久久| 日韩免费观看视频| 国产精品无码亚洲一区二区三区| a级男女仿爱免费视频| 亚洲av日韩av天堂影片精品| 69视频免费观看l| 亚洲熟女综合一区二区三区 | 亚洲欧洲精品一区二区三区| 久久精品免费一区二区三区| 亚洲精品人成在线观看| 2019中文字幕在线电影免费| 亚洲AV成人一区二区三区在线看| 嫩草成人永久免费观看| 亚洲成a人片在线观看中文!!!| 4hu四虎免费影院www| 亚洲精品无码久久久久去q | 亚洲国产精品一区二区久久hs| 风间由美在线亚洲一区| 国产L精品国产亚洲区久久| 鲁丝片一区二区三区免费| 亚洲91精品麻豆国产系列在线| 67pao强力打造国产免费| jzzijzzij在线观看亚洲熟妇| 91香蕉成人免费网站| 一级毛片免费播放视频| 亚洲一区二区中文| 亚洲AV网站在线观看|