页面点击下载功能

response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0L);
response.setContentType("application/x-download");
response.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter();

你可能感兴趣的:(下载)