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);

 

相关文章:

  • 2021-08-18
  • 2022-01-24
  • 2021-09-15
  • 2021-11-10
  • 2021-12-17
  • 2022-01-27
  • 2021-10-01
猜你喜欢
  • 2022-12-23
  • 2021-12-17
  • 2021-11-04
  • 2021-12-23
  • 2021-12-17
  • 2021-11-23
  • 2021-11-23
相关资源
相似解决方案