File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Waiting Page

 
Jonathan Lister
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My struts project produces reports from a database. Some of the queries take a while to return all their results, in the meantime the user sees a blank page. Is there a way to display a "Please wait" page while the query runs, which is then replaced by the results page when the query is completed.
 
Srikanth Shenoy
author
Ranch Hand
Posts: 184
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to check this article by Kyle.
http://www.javaranch.com/newsletter/200403/Journal200403.jsp#a4
If you are just using Tomcat, then adopt the first part of the article using the browser's auto-refresh feature.
 
brad balmer
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another good way of doing this is by using a <div> tag initially setting it to NOT be visible. Using the javascript nsubmit, make the div visible and when the page changes the 'Please Wait' image goes away.
 
Srikanth Shenoy
author
Ranch Hand
Posts: 184
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Brad Balmer:
Another good way of doing this is by using a <div> tag initially setting it to NOT be visible. Using the javascript nsubmit, make the div visible and when the page changes the 'Please Wait' image goes away.

Brad,
That solution has a glitch. The DIV does not necessarily make trips back to the server, which means the long running transaction times out after a while since the browser feels that the site is down. Sometimes the web server times out the socket connection since it has not receieved any response from the application server. Hence it is essential to make the heartbeat check. This is exactly what the auto-refresh does.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic