In my opinion, when you call your jsp, it should immediately return to the user, but also indicate that a complex task is being considered in the background (for example, using the download counter). If you want to know about the progress of a task, you must use either Ajax polling or Comet push to get it from your server. To get and display the progress, I think Ajax is enough, and the comet may be a bit sorted out. Here is another Ajax approach:
http://en.wikipedia.org/wiki/Ajax_(programming )
More about your question, the servlet (as well as jsp) works according to the HTTP protocol, which is based on the request-> response model. In today's world, there are rarely sites where you switch to jsp to perform a difficult task, and then you need to sit idle until your request is complete. You might want to give your user the freedom to interact with your web application / website while his request is being processed in the background.
Nikola Yovchev
source share