后台: @RequestMapping("/findPI")/*查询所有警员信息*/
@ResponseBody
public ModelAndView findAllPolInfo(HttpServletRequest request, HttpServletResponse response){
ModelAndView m=new ModelAndView();
List list=PolInfo.findAllPolInfo();
System.out.println(list+"***********************");
JSONArray jsay=JSONArray.fromObject(list);
System.out.println(jsay+"*************************");
/*m.addObject("list", jsay);*/
try {
response.getWriter().print(jsay);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
/*m.setViewName("/select.jsp");*/
return m;
}