Home > front end >  With th: href spread value to the (/detail/{material_id}/{name}/{ty, returns to detailpage, found th
With th: href spread value to the (/detail/{material_id}/{name}/{ty, returns to detailpage, found th

Time:09-19

 
@ RequestMapping (value={https://bbs.csdn.net/topics/"/detail/{material_id}/{name}/{type}"})
Public String gotodetailpage (@ PathVariable (" material_id ") Integer material_id, @ PathVariable (" name ") String name, @ PathVariable (" type ") String type, the HttpSession session, Model Model) {
Material material=materialservice. SelectById (material_id);
The String url=material. GetUrl ();
Session. SetAttribute (" material_id material_id);
Session. SetAttribute (" url ", url);
Session. SetAttribute (" name ", name);
The session. The setAttribute (" type ", type);
Collection Comments=commentservice. SelectById (material_id);
Model. The addAttribute (" comments ", comments);
Return "/detailpage";
}

Later I return "/detailpage" into a station. The HTML page and then use the refresh to jump to detailpage, but such comments are showed out,
Ask everybody to help,
  • Related