日期:2014-05-17 浏览次数:20612 次
<2011-11-24 上午08时50分47秒 GMT> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@ee9368 - appName: '_appsdir_SEC_dir', name: 'SEC', context-path: '/SEC'] Root cause of ServletException. java.net.SocketException: Socket closed at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at weblogic.servlet.internal.ChunkOutput.writeChunkTransfer(ChunkOutput.java:525) at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:504) at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:382) Truncated. see log file for complete stacktrace
this.getResponse().setHeader("Cache-Control", "no-cache"); this.getResponse().setDateHeader("Expires", 0); this.getResponse().setContentType("application/vnd.ms-excel;charset=UTF-8"); this.getResponse().setHeader("Content-Disposition", "attachment;filename=" + new String((title + ".xls").getBytes("GBK"), "iso8859-1")); WritableWorkbook workbook = Workbook.createWorkbook(this.getResponse().getOutputStream()); // ......excel表格内文字边框等样式 此处省略 // ......查数据库 遍历list往表格内写数据 此处省略 workbook.write(); workbook.close();