如何在弹簧控制器类中编写代码时在新窗口或选项卡中打开URL。 下面是代码:在新窗口中打开链接或标签
@RequestMapping(value = "/showPage", method = RequestMethod.GET)
public ModelAndView openDataLink(HttpServletRequest request, HttpServletResponse response, BindException errors) throws Exception {
//logic to get or construct the URL
return new ModelAndView(new RedirectView("http://www.google.com"));
}
从我的应用程序时,我访问位指示,google.com是越来越在同一窗口中从那里我'访问应用程序打开。如何在访问控制器窗体的应用程序时使Google.com在新窗口或选项卡中打开。请建议。
相关:http://forum.spring.io/forum/spring-projects/web/49351-redirectview-can-i-have-this-redirect-to-a-new-window – Brian 2014-10-16 20:01:38