生成HTML页面的代码项目中使用




<%
response.reset();
response.setContentType("application/force-download");
response.setHeader("Content-Disposition", "attachment; filename=test.html");       
java.io.PrintStream outprint=new java.io.PrintStream(response.getOutputStream());
System.setOut(outprint);
System.out.println("afadsf");         
outprint.close();     

%>

你可能感兴趣的:(java,html)