Hi All,

In my application, we have download excel option. When user is downloading an excel file and during that process user interrupts the download by click "stop loading this page(red cross mark on browser)" symbol on mozilla or IE and then refresh the page.

During this process, i am getting exception

[4/26/11 20:08:00:203 IST] 0000002e SystemErr R com.ibm.wsspi.webcontainer.ClosedConnectionExcepti on: OutputStream encountered error during write
[4/26/11 20:08:00:203 IST] 0000002e SystemErr R at com.ibm.ws.webcontainer.channel.WCCByteBufferOutpu tStream.write(WCCByteBufferOutputStream.java:103)
[4/26/11 20:08:00:203 IST] 0000002e SystemErr R at com.ibm.ws.webcontainer.srt.SRTOutputStream.write( SRTOutputStream.java:95)
[4/26/11 20:08:00:203 IST] 0000002e SystemErr R at com.ibm.ws.webcontainer.srt.BufferedServletOutputS tream.writeOut(BufferedServletOutputStream.java:45 8)
[4/26/11 20:08:00:203 IST] 0000002e SystemErr R at com.ibm.ws.webcontainer.srt.BufferedServletOutputS tream.write(BufferedServletOutputStream.java:302)
[4/26/11 20:08:00:203 IST] 0000002e SystemErr R at java.io.OutputStream.write(OutputStream.java:73).

After the user clicks on Refresh button in mozilla or IE, in my java file the control comes to line where i am trying to write to output stream.

File spreadSheetData = generateXMLContent(xmlBuffer, encodeType);
File odsFile = getODSFile(spreadSheetData, request);
byte[] contentFileBytes = getBytes(odsFile);
out.write(contentFileBytes);
out.flush();

In generateXMLContent(...) we are generating an xml file.

later, it comes to out.write(contentFileBytes) and throws the above mentioned exception.

Please let me know how to handle this kind of issues.

Thanks,
Chinnu