Hello,

Typically, the download code is like:  
" ServletOutputStream out = response.getXXX(); 
  byte[] binArray = readFileToBinaryArray(fileName); 
  response.setXXX(...); 
   ... 
  out.write(binArray); 
  out.flush(); "

But how can I know if the user has downloaded the file 
successfully, since he may cancel the download before it
is finished? For example, by clicking the "cancel" button 
in the download progress window at browser side. 

I have tried  
" try { 
   out.write(binArray); 
   out.flush(); 
  } catch (IOException ie) {
   .... 
  } 

But it doesnt work! When I click "cancel" in the browser 
side, it seems the whole servlet just returns, it doenst even go 
foward to excute the remaining code! And nothing is thrown
either! I dont know if this is a bug or I did something wrong.

I am now using Tomcat4.X

Any help is appreicated!
Haojun

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to