<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 閱讀(448) 評論(0)  編輯  收藏 所屬分類: Struts2

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

    導航

    統計

    公告

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

    常用鏈接

    留言簿(3)

    隨筆分類

    隨筆檔案

    文章分類

    相冊

    收藏夾

    Java Website

    java技術博客

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 免费a级毛片无码av| 日本二区免费一片黄2019| 亚洲精品乱码久久久久久按摩 | 亚洲欧洲日本精品| 91九色老熟女免费资源站| 亚洲另类视频在线观看| 岛国av无码免费无禁网站| 亚洲AV噜噜一区二区三区| 一级毛片直播亚洲| 四虎国产精品免费永久在线| 亚洲avav天堂av在线不卡| 99精品视频在线免费观看| 亚洲欧洲校园自拍都市| 永久免费bbbbbb视频| 一个人看的www视频免费在线观看 一个人看的免费观看日本视频www | 香港a毛片免费观看 | av在线亚洲欧洲日产一区二区| 中文在线日本免费永久18近| 亚洲国产精品VA在线看黑人| 91香焦国产线观看看免费| 四虎亚洲精品高清在线观看| 免费**毛片在线播放直播| 97在线视频免费公开视频| 亚洲精品日韩专区silk| 日韩免费三级电影| 两个人www免费高清视频| 亚洲卡一卡2卡三卡4麻豆| 国产精品无码免费视频二三区 | 成人永久福利免费观看| 两个人的视频www免费| 亚洲一级毛片免费看| heyzo亚洲精品日韩| 99久久精品国产免费| 亚洲另类无码专区首页| 亚洲综合精品网站在线观看| 182tv免费视视频线路一二三| 国产精品亚洲lv粉色| 亚洲天堂男人天堂| 四虎精品亚洲一区二区三区| 亚洲精品视频免费在线观看| 欧洲亚洲国产精华液|