try {
response.setContentType("application/pdf");
ServletOutputStream out = response.getOutputStream();
PdfWriter.getInstance(document,out);
document.open();
document.add(new Paragraph("Hello World"));
document.close();
out.flush();
}
catch (Exception e) {
e.printStackTrace(System.err);
}
response.setContentType("application/pdf");
ServletOutputStream out = response.getOutputStream();
PdfWriter.getInstance(document,out);
document.open();
document.add(new Paragraph("Hello World"));
document.close();
out.flush();
}
catch (Exception e) {
e.printStackTrace(System.err);
}
解决方案 »
- hibernate save for循环保存只保存最后一次
- JAVA里不用组件上传怎么获取FILE路径
- hibernate 插入乱码问题
- ant包解压zip文件。。。。求助。。。。。
- Stirng和StingBuffer问题
- servlet 抛出的运行时异常,怎么传到error.jsp页面?
- 基XML的新闻发布系统
- <html:form action="oxAction.do?forumID=取参数值代码"> 问题
- CMP中使用自增字段
- 什么是web services?
- 再帖:申请了一个虚拟主机,用java读写xml出现无权限的问题。
- 请问怎么用Java做一个Flash的播放器?100分外还有,在线等待
可以找到你的答案