@RequestMapping("/lookboard")public String lookboard(HttpSession session,Model model){LookmsgService ls=new LookmsgService();List<BoardMsg> bmsg=ls.lookmsgboard();System.out.println(bmsg);model.addAttribute("bmsg", bmsg);//System.out.println("incontroller:"+rd.getName());return "/reader/board/lookboard";}这是jsp里的代码<table><tbody><c:forEach items="${bmsg}" var="record" begin="0" varStatus="status"><tr><td>${record.uno}</td><td>${record.msgcontent}</td><td><a href="deleMessage?uno=${record.uno}&msgcontent=${record.msgcontent}">删除</a></td></tr></c:forEach></tbody></table>
1 回答
神不在的星期二
TA贡献1963条经验 获得超6个赞
@RequestMapping("/lookboard")
public ModelAndView lookboard()
{
ModelAndView model = new ModelAndView("/reader/board/lookboard");
LookmsgService ls=new LookmsgService();
List<BoardMsg> bmsg=ls.lookmsgboard();
System.out.println(bmsg);
model.addAttribute("bmsg", bmsg);
//System.out.println("incontroller:"+rd.getName());
return model;
}
添加回答
举报
0/150
提交
取消