DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28325>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28325

Servlet Received Partial Data

           Summary: Servlet Received Partial Data
           Product: Tomcat 5
           Version: 5.0.18
          Platform: Other
        OS/Version: AIX
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Servlet & JSP API
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Our team is using Tomcat 5.0.18 (running on AIX 5.1) as an input file receiver. 
The input file size from 1 KB to 500 KB and there is no LF or CR in the middle 
of file, in another word, the whole file came in as one big line.
At first, we were using BufferedReader.readline() and Tomcat thrown IOException 
for some files. Then we tried using BufferedReader.read(char []) to receive 
data from the input file and put the data into a StringBuffer:
===========================================================
BufferedReader meoBody = httpServletRequest.getReader();
while ((bytesRead=meoBody.read(meoContentChars)) != -1){
   totalBytes+=bytesRead;
   meoContentBuffer.append(meoContentChars,0,bytesRead);
}

where 
   meoBody = httpServletRequest.getReader();
   meoContentBuffer=new StringBuffer(incomingFileContentLength);
   meoContentChars=new char[512];
===========================================================
We are reading 512 bytes at a time, most time we got the whole file fine, but 
some time we ONLY got partial data from the incoming file. The missed data 
portion is always somewhere in the middle of file. The less network traffic is, 
the more chance that we could receive the whole file. 
We are just wondering whether this happenned to other Tomcat 5 users before or 
not. I'm really appreciate if you could provide some advices on this issue.

Thanks,
Yongan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to