weblogic 8.1 filedownload實現中的奇怪問題

ntukiki發表於2004-02-13
現在做檔案下載的公共模組。遇到如下問題,請賜教:

我已經在程式碼中設定了 m_response.setContentLength((int)l);也就是下載檔案的大小。為什麼在最後一個迴圈的時候總是出錯。。。

Old JSP begins
Old JSP 001
Old JSP 002
Old JSP 003
DiskFileDownlaod downloadFile 001;
DiskFileDownlaod downloadFile 002;
DiskFileDownlaod downloadFile 003;
DiskFileDownlaod downloadFile 004;
DiskFileDownlaod downloadFile 005;
DiskFileDownlaod downloadFile 006;
DiskFileDownlaod downloadFile 007;
DiskFileDownlaod downloadFile 007-1;
DiskFileDownlaod downloadFile 007-2;
DiskFileDownlaod downloadFile 007-3;
the blockBuffer size is:65000
the blockSize is:65000
the read size is:65000
the k value is::65000
the l value is::116372
DiskFileDownlaod downloadFile 007-4;
DiskFileDownlaod downloadFile 007-1;
DiskFileDownlaod downloadFile 007-2;
DiskFileDownlaod downloadFile 007-3;
the blockBuffer size is:65000
the blockSize is:65000
the read size is:51372
the k value is::116372
the l value is::116372
<2004-2-13 上午09時52分03秒 GMT+08:00> <Error> <HTTP> <BEA-101019> <[ServletCont
ext(id=14276270,name=filedownload,context-path=/filedownload)] Servlet failed wi
th IOException
java.net.ProtocolException: Exceeded stated content-length of: '116372' bytes
at weblogic.servlet.internal.ServletOutputStreamImpl.checkCL(ServletOutp
utStreamImpl.java:219)
at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutput
StreamImpl.java:170)
at com.hp.j2ee.FileDownload.DiskFileDownload.downloadFile(DiskFileDownlo
ad.java:236)
at com.hp.j2ee.FileDownload.DiskFileDownload.downloadFile(DiskFileDownlo
ad.java:150)
at com.hp.j2ee.FileDownload.DiskFileDownload.downloadFile(DiskFileDownlo
ad.java:138)
at jsp_servlet._jsp.__oldfiledownload._jspService(__oldfiledownload.java
:147)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:431)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6310)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3622)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>
<2004-2-13 上午09時56分35秒 GMT+08:00> <Error> <JTA> <BEA-110032> <Error renamin
g file [.\cgServer\./logs/cgServer.0000.tmp] to [.\cgServer\./logs/cgServer.0000
.tlog].>

相關文章