Monday, April 8, 2002 09:37 PM
How about this scenario:
-submit to the servlet
-servlet starts back-end processing: initailize something that prevents double submition & send back a page that tells your user to wait.
-right after returning the page, the servlet starts the real processing as a background task
-the 'please wait' page can include a META REFRESH with a 30 second time-out, so that every 30 seconds the browser contacts the servlet with a taskID (just an arbitrary identifier to help identify the background task). The servlet code checks if the matching task is done or not.
- if it is not done, the servlet code returns the same 'please wait' page, with the same taskID and the same 30 second time-out
-if it is done, then the servlet code returns whatever the background task returned when it ended.