What's the best approach under the servlet specification, to display such a message while a query is taking place in the background?
Thanks in advance for your input
-
"Please Wait..." loading page (3 messages)
- Posted by: Markos Charatzas
- Posted on: October 12 2004 05:35 EDT
Threaded Messages (3)
- "Please Wait..." loading page by Mircea Crisan on October 12 2004 12:01 EDT
- "Please Wait..." loading page by Roger Tan on October 12 2004 12:28 EDT
- "Please Wait..." loading page by Mircea Crisan on October 13 2004 03:00 EDT
- "Please Wait..." loading page by Roger Tan on October 12 2004 12:28 EDT
-
"Please Wait..." loading page[ Go to top ]
- Posted by: Mircea Crisan
- Posted on: October 12 2004 12:01 EDT
- in response to Markos Charatzas
Hi
I don't think that the servlet spec has something to say about your specific problem.
Anyway, here is a proposal:
Start the query in a new thread and quickly return the "Please wait..." page to the broswer. When the search thread finishes, it puts the results of the search in the session. The "Please wait ..." page should have a short expiration time (like 3 seconds) and each time is reloaded from the server it checks if the long search is over. In order to avoid the flicker effect, you might consider some hidden frames that do the search result availability check. If the search is over forward to the search results page instead (which reads and removes the search results from the session). This solution has the disadvantage that there is no way to notify the web server if the user aborts the search (by closing the "Please wait ..." browser page). If this happens the web servers performs additionatl work for the search, and the serach resutls that are not used just bloat uyour session and are cleaned up only on session close/expiration.
Best regards, Mircea -
"Please Wait..." loading page[ Go to top ]
- Posted by: Roger Tan
- Posted on: October 12 2004 12:28 EDT
- in response to Mircea Crisan
Why not just used the meta information on the http header i.e. the refresh, this is easier I would think. when the user clicks on a link, forward to a page that has a refresh set to n seconds, you can also specify the link that the browser will go to once n seconds has passed. -
"Please Wait..." loading page[ Go to top ]
- Posted by: Mircea Crisan
- Posted on: October 13 2004 03:00 EDT
- in response to Roger Tan
Yep, that is what I was meaning by page expiration time :-)