This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Waiting Page

 
Greenhorn
Posts: 12
  • 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.
 
author
Posts: 184
  • 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.
 
Ranch Hand
Posts: 57
  • 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
Posts: 184
  • 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.
 
Stop it! You're embarassing me! And you are embarrassing this tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic