This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Waiting screen - how to ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Waiting screen - how to ?" Watch "Waiting screen - how to ?" New topic

Waiting screen - how to ?

Stefan Geelen
Ranch Hand

Joined: Nov 19, 2001
Posts: 49
I would like to simulate a waiting screen using servlets.
When a user clicks on a button I excecute following:

The servlet will
1) Send a reponse back to the 'calculating' window indicating the user has to wait.
2) Starts up a Thread that performs the calculation (well in fact, it is generating a .pdf document).
Now my problems are following:
1) When the generation is finished I need to close the waiting screen and
2) The .pdf needs to send back to the main window.
I don't have any idea how to do this.
Any suggestions ?
Thanks ,
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904 06/11/jsp_progressbars.html

Tejpal Singh

Joined: Aug 08, 2003
Posts: 26
Originally posted by Pradeep Bhat: 06/11/jsp_progressbars.html

Pradeep the link does not work...
Maybe it should be...Progress Bars or
[ September 11, 2003: Message edited by: Tejpal Singh ]

"When work, commitment and pleasure all become one and you reach that deep well where passion lives, nothing is impossible."
Stefan Geelen
Ranch Hand

Joined: Nov 19, 2001
Posts: 49
thanks for the quick response...
but unfortunately this article does not solve my questions.
It is not a problem for me to open a pop-up displaying a waiting message.
I can even close the waiting window (by letting this waiting window refresh automatically (calling again the servlet) and when the Working Thread is FINISHED closing this window by sending some Javascript to the window.
The problem remains is how to automatically display the PDF in the main window.
Juanjo Bazan
Ranch Hand

Joined: Feb 04, 2002
Posts: 231
This old JW article should help you:
Streaming output
It is sorta covered in the JavaRanch Style Guide.
subject: Waiting screen - how to ?
Similar Threads
Downloading a PDF using JSP-JS-Java Servlet
object doesn't support the property or method
Http connections using background threads
file download-user authentication-window close
Waiting screen : How -to ?