Http and Servlet Inner workings
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, April 8, 2002 07:36 PM

Hi, If make a form submission, and afterwhich this page is processed in by a servlet that takes about 2 minutes, and i want to prevent the user by submitting the page twice by doing some back-end checks (javascript disallowed) on subsequent submissions and redirecting them to another "please wait" page, can the initial submission's response be reflected on the browser once it has finished its processing? If so, hows does the client's PC knows that the response from the server is for that particular's instance of the IE? Since i was thinking that the redirection to the "please wait" page would have "broken" the order of things.... Thank you so much! Cheers, Wai Meng    More>>

Hi,


If make a form submission, and afterwhich this page is processed in by a servlet that takes about 2 minutes, and i want to prevent the user by submitting the page twice by doing some back-end checks (javascript disallowed) on subsequent submissions and redirecting them to another "please wait" page, can the initial submission's response be reflected on the browser once it has finished its processing? If so, hows does the client's PC knows that the response from the server is for that particular's instance of the IE? Since i was thinking that the redirection to the "please wait" page would have "broken" the order of things.... Thank you so much!


Cheers,
Wai Meng

   <<Less

Re: Http and Servlet Inner workings

Posted By:   Laurent_Mihalkovic  
Posted On:   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.

cheers,
laurent

About | Sitemap | Contact