I have an application that I deploy in Tomcat. When I run app it generate static data (js, css, html etc) for report with html report page and put it in user.home directory. After that I want to redirect to that html report page. I've tried to redirect with ModelAndView, RedirectView, "redirect:/" and etc. but all browsers show me ERR_UNSAFE_REDIRECT since I can't open external file from browser for security reasons. So how can I open that page from my app? Thank you in advance.
@GetMapping("/reports")
public ModelAndView getReportsView() {
return new ModelAndView("redirect:" + "C:/Users/…/html-reports/overview-tags.html");
}