1
我使用iframe模擬ajax文件下載,請求轉到tomcat應用程序(servlet)進行文件下載,這是一個耗時的過程(可能需要超過1分鐘),問題是在一定數量時間,無論是tomcat或瀏覽器客戶端終止連接。請參閱下面的Tomcat例外。誰在終止它,客戶端還是服務器?有沒有辦法增加超時時間?tomcat socketTimeout異常
var iframe = document.createElement("iframe"); iframe.src="http://xxxxxxxxx?";
Caused by: ClientAbortException: java.net.SocketException: Broken pipe at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:83) at org.apache.poi.poifs.storage.BigBlock.doWriteData(BigBlock.java:55) at org.apache.poi.poifs.storage.DocumentBlock.writeData(DocumentBlock.java:220) at org.apache.poi.poifs.storage.BigBlock.writeBlocks(BigBlock.java:86) at org.apache.poi.poifs.filesystem.POIFSDocument$BigBlockStore.writeBlocks(POIFSDocument.java:603) at org.apache.poi.poifs.filesystem.POIFSDocument.writeBlocks(POIFSDocument.java:275) at org.apache.poi.poifs.filesystem.POIFSFileSystem.writeFilesystem(POIFSFileSystem.java:390) at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:1168) at net.sf.jasperreports.engine.export.JRXlsExporter.closeWorkbook(JRXlsExporter.java:199) ... 17 more Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)