81,092
社区成员
发帖
与我相关
我的任务
分享
<%
String txt = (String)request.getAttribute("txt");
response.setContentType("application/txt");
response.setHeader("Content-disposition", "attachment;filename=table.txt");
BufferedOutputStream bos = null;
try {
bos = new BufferedOutputStream(response.getOutputStream());
bos.write(txt.getBytes());
} catch (IOException e) {
throw e;
} finally {
if (bos != null)
bos.close();
}
%>