Well, you could write a stop method and rewrite the "start" method to use
threads, then after you instantiate the class, store it as a session variable, then
start the "start" method as a thread. Then return a page containing the key used
to store the object and stop button. The stop button will call another jsp that
will retreive the object stored under that key and call the "stop" method. This is
all really loosely explained, but you should be able to extrapolate from here.
Unfortunately, your user will also get no notification that the process is finished.
You could, however, write a checkProgress method that another jsp can use to check the process and "refreshes" from time to time. This would have to called
using a refresh from the "stop button" page and also then must contain the "stop
button".
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
Offline 4,043 posts
since Feb 2006