Finally, my Struts application is running in production environment. But, 2
exceptions getting logged in
log files everyday. I want to get rid of them.
1. GetDocumentContentAction: * Exception:null
com.ibm.servlet.engine.srt.WriteBeyondContentLengthException
at
com.ibm.servlet.engine.srt.BufferedServletOutputStream.write(BufferedServlet
OutputStream.java(Compiled Code))
at
GetDocumentContentAction.execute(GetDocumentContentAction.java(Compiled
Code))
..............
2. GetDocumentContentAction: * Exception:There is no process to read data
written to a pipe.
java.io.IOException: There is no process to read data written to a pipe.
at java.net.SocketOutputStream.socketWrite(Native Method)
at
java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled Code))
at com.ibm.ws.io.Stream.write(Stream.java(Compiled Code))
at com.ibm.ws.io.WriteStream.write(WriteStream.java(Compiled Code))
at
com.ibm.ws.http.ResponseStream.writeChunk(ResponseStream.java(Compiled
Code))
at com.ibm.ws.http.ResponseStream.write(ResponseStream.java(Compiled
Code))
at com.ibm.ws.io.WriteStream.write(WriteStream.java(Compiled Code))
at
com.ibm.servlet.engine.srp.SRPConnection.write(SRPConnection.java(Compiled
Code))
at
com.ibm.servlet.engine.srp.SRPConnection.write(SRPConnection.java(Compiled
Code))
at
com.ibm.servlet.engine.srt.SRTOutputStream.write(SRTOutputStream.java(Compil
ed Code))
at
com.ibm.servlet.engine.srt.BufferedServletOutputStream.write(BufferedServlet
OutputStream.java(Compiled Code))
at
com.ibm.servlet.engine.srt.BufferedServletOutputStream.write(BufferedServlet
OutputStream.java(Compiled Code))
at
GetDocumentContentAction.execute(GetDocumentContentAction.java(Compiled
Code))
..............
These above 2 exceptions occur when GetDocumentContentAction writes the
content to ServletOutputStream. Here is the code snippet:
String strEncodedFileName =null;
if (fileName!=null) strEncodedFileName =
response.encodeURL(fileName);
response.setContentLength(iFileSize);
if (strEncodedFileName!=null){
response.addHeader("Content-disposition",
"filename=" + strEncodedFileName + ";");
}
ServletOutputStream sos = response.getOutputStream();
// get the data and write to a file
byte[] data = null;
while((data= businessDelegateBean.getNextWindow()) != null) {
dataLen = dataLen + data.length;
sos.write(data);
sos.flush();
}
sos.close();
businessDelegateBean.getNextWindow() gives max of 64 KB (64 * 1024 bytes).
So, Is there any limitations of content length that can be written
OutputStream?
Any ideas how to eliminate these exceptions?
Regards,
Reddy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]