使用Servlet实现文件下载的时候,避免浏览器自动打开文件 response.addHeader("Content-Disposition", "attachment; filename=" + response.encodeURL(downloadfile));