sendRedirect下载链接,浏览器中的文件名乱码问题:
// 文件名中文乱码问题 fileURL = new String(fileURL.getBytes("UTF-8"),"ISO8859-1"); response.setCharacterEncoding("UTF-8"); response.setContentType("text/html; charset=UTF-8"); response.setHeader("Content-Disposition", "attachment;fileName=" + fileName); // 重定向请求下载 response.sendRedirect(fileURL);