日期:2014-05-17 浏览次数:20674 次
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); response.setCharacterEncoding("UTF-8"); response.setHeader("Content-disposition", "attachment;filename=aa.txt" ); byte[] aa="中国,你好".getBytes(); OutputStream out=response.getOutputStream(); out.write(aa); out.close(); }