关于前后台传值:


controller层:

public ModelAndView goAdd(HeheEntity hehe, HttpServletRequest req) {
String id = req.getParameter("id");//拿到前台的数据id

String name = req.getParameter("gg");//拿到前台的数据gg

System.out.println(name);
   String Sql = "select gg from hehe ";

List<String> heheList = systemService.findListbySql(Sql);

req.setAttribute("hehePage", heheList); //拿到数据库的信息






posted on 2016-12-11 18:00  songyinan  阅读(193)  评论(0编辑  收藏  举报