您的位置:首页 > 编程语言 > Java开发

Springmvc重定向

2015-11-17 09:35 507 查看
比如:

<pre name="code" class="java"> @RequestMapping("saveWeather")
public ModelAndView saveWeather(HttpServletRequest req) {

String locationId = req.getParameter("locationId");
<strong> Map map = new HashMap();</strong>
map.put("ajax", "true");
map.put("locationId", locationId);
<strong>ModelAndView mv = new ModelAndView(new RedirectView("showWeather.do"),map);</strong>
.....


                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: