response.setContentType("application/x-download");
response.addHeader("Content-Disposition", "attachment;filename="+new String( "中文".getBytes("utf-8"), "ISO8859-1" )+"文件类型");

OutputStream out = response.getOutputStream();

向out中写入流

out.flush();

response.flushBuffer();

即可

相关文章:

  • 2021-10-13
  • 2021-10-29
  • 2022-01-21
  • 2021-10-21
  • 2022-12-23
  • 2021-04-12
  • 2022-12-23
  • 2022-01-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2021-09-18
  • 2021-12-12
相关资源
相似解决方案