jfy3d(劍事)BLOG

            BlogJava :: 首頁 :: 新隨筆 :: 聯(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)論
            

          主站蜘蛛池模板: 洮南市| 新晃| 石楼县| 喀喇沁旗| 沁水县| 岱山县| 枝江市| 昌乐县| 巴马| 武隆县| 随州市| 武穴市| 清徐县| 正安县| 定襄县| 贡嘎县| 孙吴县| 疏勒县| 石台县| 延长县| 伊金霍洛旗| 教育| 邛崃市| 岑巩县| 金华市| 南通市| 临邑县| 民权县| 陆丰市| 长沙县| 东源县| 汨罗市| 丰城市| 武汉市| 屏南县| 文水县| 同心县| 鹰潭市| 克拉玛依市| 新津县| 松江区|