Content-Disposition属性有两种类型 inline :将文件内容直接显示在页面attachment:弹出对话框让用户下载 弹出对话框下载文件 response.setHeader(“Content-Disposition”, “attachment; filename=”+fileName);