转自:http://blog.sina.com.cn/s/blog_a4bfe8c90101clvr.html
controller:
@RequestMapping(value = "/monitor.do", method = RequestMethod.GET)
public ModelAndView getMonitorIndex(HttpServletRequest request,
HttpServletResponse response, ModelMap modelMap,@RequestParam("location") String location) {
Map<String, List<String>> map=monitoringService.getCurrentNodesIndex(location);
Object[] temp=map.keySet().toArray();
System.out.println(temp);
List<String> locationTemp=map.get(temp[0]);
System.out.println("here"+locationTemp.toString());
String yetContent=locationTemp.get(0);
String currentContent=locationTemp.get(1);
System.out.println("");
modelMap.put("location",temp[0]);
modelMap.put("yetContent",yetContent);
modelMap.put("currentContent",currentContent);
return new ModelAndView("managment/monitor");
}
------------------
jsp:
<div id="waterContent">${location};${yetContent};${currentContent}</div>