JAVA web 文件下载时 文件头设置

response.setContentType(“text/html;charset=UTF-8”);
response.setContentType(“application/octet-stream; charset=utf-8”);
response.setHeader(“Content-Disposition”, “attachment; filename=\”” + new String(fileName.getBytes(),”ISO-8859-1”) + “\”“);
response.setContentType(“APPLICATION/VND.MS-XCEL;charset=GBK”);

你可能感兴趣的:(java-web)