Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

"Transaction Processing" message from servlet

I have an application running under WAS v3.5.  There are several servlets that can run for several minutes.  I would like to send the client an HTML page basically saying his/her data is being processed and then send a confirmation page once the servlet is completed.  The way the process is built, the servlet processed the data then issues a sendRedirect to the JSP that shows the results.  However, with this sequence they don't get anything until the servlet is done.  

What can I do?
0
WGPuckett
Asked:
WGPuckett
  • 2
1 Solution
 
jerelwCommented:
Pass your printwriter to a Thread that routinely (every 1000 - 5000 millisenconds) checks a worker thread.

Have the worker thread set a String status as it hits key check points (inserted 10,000 records, deleted 500 keys, etc) and have the main Thread 'push' a JavaScript tag out at the regular intervals.

After the entire transaction is complete, simply push out a <JavaScript>document.location.href=""</JavaScript>
0
 
jerelwCommented:
If you're developing Java applications, this should get you going: http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20507509.html
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now