Java导出请求头
来源:华佗健康网
StringBuilder contentDispositionValue = new StringBuilder();
contentDispositionValue.append("attachment; filename=")
.append(percentEncodedFileName)
.append(";")
.append("filename*=")
.append("utf-8''")
.append(percentEncodedFileName);
response.setHeader("Content-disposition", contentDispositionValue.toString());
response.setHeader("Cache-Control","No-Cache");
String percentEncodedFileName = URLEncoder.encode(realFileName, StandardCharsets.UTF_8.toString());
因篇幅问题不能全部显示,请点此查看更多更全内容