Forums Register Login

Display appliaction processing status msg in JSP

+Pie Number of slices to send: Send
Hi
I have a JSP page with a button which when clicked does enormous processing at the back-end and takes around 10 minutes to complete. I want to provide the users some status update messages of what happening in the JSP.
Can anyone point to some sample application/design/code samples ideas of how to go ahead ?

Thanks
Kawa
+Pie Number of slices to send: Send
10 minutes is way too long for a synchronous operation. The browser is likely to time out long before that.

Best to perform such long operations as background threads or in a separate daemon and give the users a means to monitor the progress of the operation.
+Pie Number of slices to send: Send
Actually it is an existing application and I cannot change the existing mechanism. What I need is to some way display display some user friendly message which refreshes intermittently about the processing which is happening at the backend. The backend processing happens in three stages and I want to display the user different messages as each stage starts.
Please let me know if you have any idea.

Thanks
Kawa
+Pie Number of slices to send: Send
The standard way to do this is to kick off the long running process in another thread or process and return immediately to a polling status page.

The long running process can write to a database field, a file, or a scoped variable with the status of it's progress.
The polling page refreshes every n seconds, checking the progress (where ever the long running process writes it) with each iteration.
[ April 13, 2005: Message edited by: Ben Souther ]
+Pie Number of slices to send: Send
Hi Ben
Can you please tell me some URLs where I can find som sample code/workign application for such a mechanism. I am not that great in coding so need some help to start writing it and then I can take it from there.
Thanks
Kawa
+Pie Number of slices to send: Send
I don't know of any example sites for this pattern.

Describe your long running process. Is it a Java method or is it in a database tier?
+Pie Number of slices to send: Send
Someone just posted this example in the servlets forum (Thanks Annie)
http://www.onjava.com/pub/a/onjava/2003/06/11/jsp_progressbars.html
My cellmate was this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1899 times.
Similar Threads
Displaying a please wait message while processing
How to show page loading status using cursor?
Showing the status of an operation
Servlet being Called Twice
Difference between JSPException and Exceptions in core java
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:53:41.