jfy3d(剑事)BLOG

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  37 随笔 :: 0 文章 :: 363 评论 :: 0 Trackbacks
action中实现动态跳转得一个方法

public class RegmobileAction extends Action {
 public ActionForward execute(
  ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)
  throws Exception
 {
  String url;
   url = "http://200.94.206.237:8070/order?"
     +"&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可以根据不同得条件指定不同得地址和不同得参数
  gotourl.setPath(url);
gotourl.setRedirect(true);
  return gotourl;
 }
posted on 2005-05-13 11:37 剑事 阅读(3126) 评论(1)  编辑  收藏 所属分类: struts

评论

# re: struts中action带参数跳转 2005-05-13 14:05 小米
在URL中的参数值是否要考虑用URLEncoder的encode方法转换一下,这样在参数值有中文字符等其它Unicode的字符的时候才不会出错。  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: