I have a jsp page which user can select file(s) and select submit, then the servlet get the file(log) name and start reading the file in realtime(do something like send email if log file contains error). Then user can select another file to read and so on. This can be done. The problem is that later (e.g. two days later) if user choose to stop reading one of the log that is being read, what is the method/way to do that?