SpringMVC利用return new ModelAndView(new RedirectView("xxx.do"), Map map)重定向传递多参数
2014-08-20 22:18
519 查看
接触SpringMVC不是很久,发现了一个好用的方法,重定向时可以通过一个Map传递给下一个控制器。
Map map= new HashMap();
map.put("userName", "yangjinde");
map.put("pwd", "yjd");
return new ModelAndView(new RedirectView("xxx.do"), map);
则在下个控制器里就可以用
String userName = request.getParameter("userName");取出数据,不过这还是get请求。
原创不易,转自:/article/2154159.html
Map map= new HashMap();
map.put("userName", "yangjinde");
map.put("pwd", "yjd");
return new ModelAndView(new RedirectView("xxx.do"), map);
则在下个控制器里就可以用
String userName = request.getParameter("userName");取出数据,不过这还是get请求。
原创不易,转自:/article/2154159.html
相关文章推荐
- SpringMVC利用return new ModelAndView(new RedirectView("xxx.do"), Map map)重定向传递多参数
- spring mvc redirect 重定向 跳转并传递参数 && mvc:view-controller直接转发页面
- spring MVC return "redirect:test.do" 传参数
- 验证参数传递引发的Java编译错误“No enclosing instance of type XXX is accessible" 及匿名内部类
- struts2.0 struts.xml type="redirect" 传递参数问题
- struts.xml 使用 type="redirect" 和type="redirectaction" 传递参数
- return new ModelAndView("redirect:/login.jsp");
- struts.xml 使用 type="redirect" 和type="redirectaction" 传递参数
- struts.xml 使用 type="redirect" 和type="redirectaction" 传递参数
- 一 uboot传递参数'console=ttyXXX'的作用
- 关于"Java中方法参数的传递方式"的探讨
- Response.Redirect 跳转传参 传递包含“&”的参数
- 用"堆栈区数据复制"理解Java赋值和参数传递机制的心得
- struts2.0传递中文参数,action重定向传中文参数,redirectAction传中文参数
- 自定义view中xml属性 提示Attribute "XXX" has already been defined
- "asmlinkage" 与 函数调用参数传递
- loaded the "xxxViewController" nib but the view outlet was not set.'
- 关于"Java中方法参数的传递方式"的探讨
- 上struts2的xml在<result type="redirect">参数问题
- request.getRequestDispatcher("/PlacardAction.do?method=toView").forward(request, response)