请输入代码 ModelAndView mv = new ModelAndView(
"redirect:/add_shopping_cart_success.do");//这个是重定向到的请求
// formcart是需要传递的对象参数
mv.addObject(formcart);
return mv;
}
@RequestMapping("add_shopping_cart_success")
public String add_shopping_cart_success(T_MALL_SHOPPINGCAR formcart,
HttpSession session, ModelMap map) {
// 用formcart 接不到
請輸入程式碼 ModelAndView mv = new ModelAndView(
"redirect:/add_shopping_cart_success.do");//这个是重定向到的请求
// 这样传的话下面能接到 就是会在浏览器显示所有参数
mv.addObject("sku_mch",formcart.getSku_mch());
mv.addObject("sku_jg",formcart.getSku_jg());
mv.addObject("sku_tp",formcart.getShp_tp());
mv.addObject("tjshl",formcart.getTjshl());
mv.addObject("shp_id",formcart.getShp_id());
mv.addObject("sku_id",formcart.getSku_id());
return mv;
}
@RequestMapping("add_shopping_cart_success")
public String add_shopping_cart_success(T_MALL_SHOPPINGCAR formcart,
HttpSession session, ModelMap map) {
方式一:自己手動拼接url