windows pop弹出关闭显示dos之前。 XLS

时间:2012-06-27 15:08:04

标签: javascript excel jsp internet-explorer-8 response

我正试图在IE8的弹出窗口中显示文档 - 但在显示之前,窗口会自动关闭。

以下是代码:

的javascript:

function hacerExportarExcel(){
   var url = contextPath + "/exportarCarteraCreditoExcel.do"
   window.setTimeout("window.open('"+url+"', '_blank', 'width=950,height=500,scrollbars=yes')",1000);

}

动作:

try {

    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "inline; filename=ConsultaCartera.xls");       
    consulta.setPdf(response.getOutputStream());
    administracionCreditoConsulta.exportarCarteraCreditoExcel(consulta); 

} catch (Exception e) {

    logger.logError(e);

} finally {

    response.getOutputStream().flush();
    response.getOutputStream().close();

}

当要求新窗口弹出并开始加载时,它会关闭并给我以下异常:

  

2012-06-27 11:01:01,951错误[LoggingFilter] log()异常(147):   ClientAbortException:java.net.SocketException:由peer重置连接:套接字写入错误       在org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)       在org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)       在org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:85)       在com.wincornixdorf.infinix.creditos.action.ExportarCarteraCreditoExcelAction.execute(ExportarCarteraCreditoExcelAction.java:82)

当我在IE 6中尝试这样做时,它会很好,弹出窗口并显示excel。它虽然不适用于IE 8 ......

任何人都可以提供帮助吗?

谢谢!

0 个答案:

没有答案