tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Problems downloading files. How to identify the CANCEL butto n?
Date Sun, 12 Jul 2009 07:14:36 GMT
siomara@portosdobrasil.gov.br wrote:
> Andre came up with a good reason and here is mine:
> 
> I work for the brazilian government that wants to keep track of people who
> download certain specific files. It also wants to send emails to the ones
> that at least started the download procces of these files. So, for this
> reason, there is no interest at all to send emails for those that canceled
> the download process.
> 
> I am looking forward for a solution because the way my code is now is wrong.
> It is logging everybody no matter which button they pressed (open, save or
> cancel).
> 
> Once more, any suggestion is more than welcome.
> 
Siomara,

What you want, is impossible from the server side, because the server by 
itself will never know.
Your code is not wrong, you are just limited by the reality of how it works.
What maybe is missing in your understanding, is that those buttons in 
the browser (run, save, cancel,..) /do not send anything/ to the server. 
  Their action is purely local to the browser.
When a user presses the cancel button, that just tells the browser to 
stop reading what is coming from the network on that connection, and 
close the connection.
But by that time, because of all the buffering in-between, it is 
possible that the server is already done sending everything, since 1 minute.
Please re-read the answers you have already received.
Your question has already been answered, and there are no more 
suggestions that anyone can make.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message