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>
.....
<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>
.....
相关文章推荐
- 【Java并发编程】之十:使用wait/notify/notifyAll实现线程间通信的几点重要说明
- Dorado+Spring+Hibernate+Maven配置方案
- 【Java并发编程】之九:死锁(含代码)
- Java线程中run和start方法的区别
- 【Java并发编程】之八:多线程环境中安全使用集合API(含代码)
- java数组Arrays.copyOf
- 【Java并发编程】之七:使用synchronized获取互斥锁的几点说明
- JAVA字符串处理函数
- JavaWeb API整理学习
- 如何利用java把文件中的Unicode字符转换为汉字
- shiro+springmvc+mybatis(2)
- Google Java编程风格指南
- java集合框架集合框架是为表示和操作集合而规定的一种统一的标准的体系结构。任何集合框架都包含三大块内容:对外的接口、接口的实现和对集合运算的算法。
- myeclipse工程环境出错:Set project compiler compliance settings to '1.5'
- java实现IP地址过滤
- ubuntu14.04,安装JDK1.8(JAVA程序需要的开发、运行环境)
- ubuntu14.04,安装JDK1.8(JAVA程序需要的开发、运行环境)
- ubuntu14.04,安装JDK1.8(JAVA程序需要的开发、运行环境)
- java yeild相关
- java synchronized详解