Ireport报表在IE中运行时,IE直接吧它当成是下载文件给处理了。
各位高手如何处理,给小弟个建议 谢谢!!!
各位高手如何处理,给小弟个建议 谢谢!!!
解决方案 »
- tomcat 中抛异com.mysql.jdbc.exceptions.MySQLTransactionRollbackException
- 求助:怎么在JS中将JSP页面中的文本框的值设置为空而不是空串
- 大家谈谈网站生成静态html页?
- 请教:javaweb服务端处理跨站脚本方案
- struts不定行input提交问题
- struts信息的显示问题.
- 第二次发同样的问题,高手可怜下。15分全给了。快要疯了
- easyui artDialog prompt框增加回车提前事件
- 请问什么是JSP中的URL重写??各位能否给一个详细的解答,多谢了
- jsp中的for循环问题
- 这句错那了?
- struts2 ongl后台数据填充出现中文乱码
反正我用的时候 没有遇到 这个问题 ... chart
File reportFile = new File(application.getRealPath("classic.jasper"));
//向报表中定义的参数赋值
Map parameters = new HashMap();
Integer i=new Integer(8);
// parameters.put( "pjId ", i);
// parameters.put("userpwd","sddddddd");
//parameters.put("username","badd");
//parameters.put("userrole","00000000");
byte[] bytes =
JasperRunManager.runReportToPdf(
reportFile.getPath(),
parameters,
conn
);
response.setContentType( "application/pdf "); response.setContentLength(bytes.length);
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(bytes, 0, bytes.length);
ouputStream.flush();
ouputStream.close();
//解决java.lang.IllegalStateException: getOutputStream() has already been called for this response
out.clear();
out = pageContext.pushBody();