How to download PDF file from url on MVC controller
To download a remote file (like a PDF) redirecting to response output, use these instructions to update a your Spring MVC controller: @RequestMapping(value="/viewAttach", method = RequestMethod.GET) public ModelAndView viewAttach(@RequestParam(value="article_id", required = true) String article_ref, HttpSession session, HttpServletResponse response) { /* *** Remember to check if Session still valid *** */ try { URL url….