Servlet: 返回响应为独立的文件(不在浏览器中直接打开) Leave a Comment / Java / August 20, 2008 August 20, 2008 String filename= "侬好.txt"; filename = URLEncoder.encode(filename,"utf-8"); response.setHeader("Content-disposition","attachment; filename="+filename);