使用servlet输出word文档
来源:互联网 发布:腾讯云域名申请后解析 编辑:程序博客网 时间:2024/09/21 09:26
try {
resp.setContentType("application/msword");
//resp.setHeader("Content-disposition","attachment;filename=Example.doc"); //下载用
File f0 = new File("c:/example.doc");
byte[] b0 = Byte_File_Object.getBytesFromFile(f0);
BufferedOutputStream dataOut = new BufferedOutputStream(resp.getOutputStream());
dataOut.write(b0,0,b0.length);
if (dataOut!=null) {
dataOut.close();
}
} catch (Exception e) {
e.printStackTrace();
}
resp.setContentType("application/msword");
//resp.setHeader("Content-disposition","attachment;filename=Example.doc"); //下载用
File f0 = new File("c:/example.doc");
byte[] b0 = Byte_File_Object.getBytesFromFile(f0);
BufferedOutputStream dataOut = new BufferedOutputStream(resp.getOutputStream());
dataOut.write(b0,0,b0.length);
if (dataOut!=null) {
dataOut.close();
}
} catch (Exception e) {
e.printStackTrace();
}
- 使用servlet输出word文档
- C#输出Word文档
- android输出word文档
- Servlet输出PDF文档方法
- Servlet输出PDF文档方法
- 创建word文档,并输出文本
- PHP 导出word 文档(浏览器输出)
- python在web中输出word文档
- POI 使用word模板生成word文档
- 使用C#创建Word文档
- 使用java生成word文档
- 使用PowerDesigner导出Word文档
- 使用itext导出word文档
- 使用c#读取word文档
- 使用Docx4j创建word文档
- 使用Docx4j创建word文档
- 使用FreeMarker生成word文档
- 使用Velocity导出Word文档
- Splash.cs的改进
- 强烈推荐:240多个jQuery插件
- c#面向对象设计模式之Singleton
- tinyMCE 使用方法
- 架构设计三角形
- 使用servlet输出word文档
- 一个相当不错的Eclipse RCP实例
- c#面向对象设计模式之工厂模式
- asp与asp.net
- WPF之数据绑定
- 2008年3月it公司红黑榜/口碑榜
- C#语言的几个层次
- xxx.style.dispaly与xxx.style.visibility区别
- 随机数函数