jsp实现下载功能
来源:互联网 发布:深圳能源集团 知乎 编辑:程序博客网 时间:2024/04/27 22:38
<%@ page language="java" pageEncoding="UTF-8"%>
//上面无需设置ContentType
<%
response.addHeader("Pragma", "no-cache");
response.addHeader("Cache-Control", "no-cache");
response.addHeader("Expires", "Thu,01 Jan 1970 00:00:01 GMT");
response.setContentType("bin;charset=gbk");
response.addHeader("Content-Disposition","attachment; filename=filename");
ServletOutputStream os = response.getOutputStream();
//do something with OutputStream
os.close();
%>
//上面无需设置ContentType
<%
response.addHeader("Pragma", "no-cache");
response.addHeader("Cache-Control", "no-cache");
response.addHeader("Expires", "Thu,01 Jan 1970 00:00:01 GMT");
response.setContentType("bin;charset=gbk");
response.addHeader("Content-Disposition","attachment; filename=filename");
ServletOutputStream os = response.getOutputStream();
//do something with OutputStream
os.close();
%>
- jsp实现下载功能
- 实现JSP的下载功能(一)
- JSP实现简单的文件下载功能
- JSP附件下载功能
- 用jsp实现直接下载文件的功能
- 用jsp实现直接下载文件的功能
- 用jsp实现直接下载文件的功能
- 用jsp实现直接下载文件的功能
- 用jsp实现直接下载文件的功能
- SpringMVC--restful中怎么样实现jsp页面的下载功能?
- jsp前台点击下载功能
- JSP实现分页功能
- JSP实现打印功能
- JSP实现分页功能
- jsp更多功能实现
- JSP实现分页功能
- JSP实现分页功能
- JSP实现分页功能
- 使用ArcGIS Engine来实现地图的点击查询并闪烁
- 整理的JasperReport资料
- 细读《Effective C++》之五
- 接受整数,然后左右反转
- 读《做个成功的人之克服羞怯》有感
- jsp实现下载功能
- 手工焊接的基本操作
- 人生的意义何在??
- 细读《Effective C++》之六
- [转]正则表达式30分钟入门教程
- 有必要解释一下
- 无组件ASP文件上传源代码
- BNF 都是context free的语法
- 添加表格的一行删除表格的一行