action 动态跳转地址

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;
 } 

 

你可能感兴趣的:(jsp)