Get status of servlet request before the response is returned

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-06-14T20:16:36Z Indexed on 2010/06/14 20:32 UTC
Read the original article Hit count: 326

Filed under:
|
|
|
|

Good evening,

I am in the process of writing a Java Servlet (Struts 2, Tomcat, JSP etc) which is capable of doing some fairly complex simulations. These can take up to 2 minutes to complete on the and will return a graph of the results. It is trivial to calculate the percentage of the simulation completed because the process works by repeating the same calculations 1000s of times.

I would be interested to know if anyone has ever tried to use client side technology to provide any estimate of the percentage complete. I.e query the servlet processing to get the number of cycles completed at various point throughout the simulation. This could then be displayed as a bar in the client browser.

Any thoughts, advice, resources would be much appreciated.

Thanks,

Alex

© Stack Overflow or respective owner

Related posts about java

Related posts about JavaScript