jfy3d(劍事)BLOG

            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            37 隨筆 :: 0 文章 :: 363 評(píng)論 :: 0 Trackbacks
          action中實(shí)現(xiàn)動(dòng)態(tài)跳轉(zhuǎn)得一個(gè)方法

          public class RegmobileAction extends Action {
           public ActionForward execute(
            ActionMapping mapping,
            ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response)
            throws Exception
           {
            String url;
             url = "     +"&CPKeys:=626A737977&Itemid=124444"
               +"&FeeNumber="+request.getParameter("phone")
               +"&Feetype=2&CTtag="+request.getParameter("CTtag")
               +"&backUrl=http://mms.0000.com.cn/mov/index.jsp"
               +"&deliverurl=http://mms.0000.com.cn/mov/deliver.do";
              ActionForward gotourl = new ActionForward(url);//url可以根據(jù)不同得條件指定不同得地址和不同得參數(shù)
            gotourl.setPath(url);
          gotourl.setRedirect(true);
            return gotourl;
           }

          評(píng)論

          # re: struts中action帶參數(shù)跳轉(zhuǎn) 2005-05-13 14:05 小米
          在URL中的參數(shù)值是否要考慮用URLEncoder的encode方法轉(zhuǎn)換一下,這樣在參數(shù)值有中文字符等其它Unicode的字符的時(shí)候才不會(huì)出錯(cuò)。  回復(fù)  更多評(píng)論
            

          主站蜘蛛池模板: 侯马市| 灵璧县| 修水县| 邓州市| 安平县| 安新县| 图们市| 翼城县| 宁陵县| 江油市| 定边县| 雅安市| 伊金霍洛旗| 高台县| 汶川县| 巴东县| 杨浦区| 石门县| 巴林左旗| 保德县| 阿勒泰市| 台北县| 禹城市| 呼伦贝尔市| 财经| 巩义市| 福泉市| 嘉定区| 通山县| 鲜城| 南昌市| 南部县| 天水市| 井陉县| 陈巴尔虎旗| 古丈县| 孝昌县| 高要市| 丰都县| 广水市| 卫辉市|