How can i open the URL in new window or tab when written the code in spring controller class. Below is the code:
@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"));
}
From my application when i access the contoller, google.com is getting opened in the same window from where i'am accessing the application. How can i make google.com open in new window or tab when accessing controller form my application. Please suggest.