-
Problem w/ JSWDK1.0.1 & ServletInputStream.readLine()
Hello all. I'm having a problem making a servlet to upload a file.
ServletInputStream.readLine(bytes[],int,int) is supposed to return -1 once
the incoming file is all read.
However, the following code gets stuck in the while loop (specifically it
looks like it gets stuck in the readLine method). It does not print the "out
of while" statement until the browser which is uploading the file times out.
Is there a problem in JSWDK1.0.1 with the implementation of ServletInputStream.readLine()??
*************************************************
....
int result=0;
ServletInputStream in = request.getInputStream();
byte[] b = new byte[8192];
while ((result = in.readLine(b,0,b.length)) != -1)
{
System.out.println(result);
}
System.out.println("Out of while");
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks