"Please Wait..." loading page


Web tier: servlets, JSP, Web frameworks: "Please Wait..." loading page

  1. "Please Wait..." loading page (3 messages)

    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

    Threaded Messages (3)

  2. "Please Wait..." loading page[ Go to top ]


    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
  3. "Please Wait..." loading page[ Go to top ]

    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.
  4. "Please Wait..." loading page[ Go to top ]

    Yep, that is what I was meaning by page expiration time :-)