W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 2001

hour glass continues

From: Sukumar Chakraborty <sukumarc@interrait.com>
Date: Mon, 15 Jan 2001 04:34:35 -0500 (EST)
To: <www-jigsaw@w3.org>
Message-ID: <NDBBLHPCKKGCHDGLHOLGAEEHCBAA.sukumarc@interrait.com>
Hi, I am facing a problem while downloading a file by a servlet using IE5.
After downloading is finished and the file is saved in my local disk, the
hour glass continues in my browser until I press the STOP button,
surprisingly the problem is not occuring when I am using Netscape. I am
enclosing the function below :

public class TestDownload extends HttpServlet {
    public void doGet(HttpServletRequest request,
                      HttpServletResponse response)
        throws IOException, ServletException
        response.setContentType( "application/doc" ); // MIME type for pdf
                  "attachment; filename=" +
       String fileURL = "test.doc";
       URL  url=new URL(fileURL);
       BufferedInputStream bis = new BufferedInputStream(url.openStream());
       BufferedOutputStream bos = new
ufferedOutputStream( response.getOutputStream());
       byte[] buff = new byte[2048];
       int bytesRead;
       while (-1!=(bytesRead=(bis.read(buff,0,buff.length)))){
       if (bis!=null){
       if (bos!=null){
Received on Monday, 15 January 2001 04:55:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:29 UTC