webmasterbeta
New Member
Hello all. I'm having a problem making a servlet to upload a file.ServletInputStream.readLine(bytes[],int,int) is supposed to return -1 oncethe incoming file is all read.However, the following code gets stuck in the while loop (specifically itlooks like it gets stuck in the readLine method). It does not print the "outof 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");