Home > other >  For springMVC jump redirected to open a new page
For springMVC jump redirected to open a new page

Time:12-01

For springmvc background redirects:
@ Override
Protected ModelAndView handleRequestInternal (it request,
HttpServletResponse response) throws the Exception {
LOGGER. The info (" -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- the OrderBigViewController start! -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
Request. SetCharacterEncoding (" utf-8 ");
String token=request. GetSession (). The getAttribute (" token "). The toString ();
The String url="";
Url="redirect:/JSP/orderview/index. Html#/? Token="+ token;

ModelAndView mv=new ModelAndView (url);
LOGGER. The info (" -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- the OrderBigViewController end! -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
return mv;
}

On his return to the menu, the menu is a label, to join the target="_blank" attribute;
If (" orderBigView ". The equals (menuBean getModule_id ())) {
Menu. Append (" & lt; Li id=\ "" + menuBean getModule_id () +" \ "& gt; target=\ \ "_blank " href=https://bbs.csdn.net/"" + menuBean getModule_url () +" \ "& gt;" +
"& lt; Span class=\ "title " & gt;" + menuBean. GetModule_name () + "& lt;/span>
");
  • Related