struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Reed" <ERE...@MAIL.NYSED.GOV>
Subject Re: Display progress bar in same page (request page) using struts2 execAndWait Interceptor
Date Tue, 05 Mar 2013 15:52:31 GMT
Pretty straight forward, google AJAX... basically you use java script to send and receive requests
without the need for user interaction.  Kind of off topic when it comes to struts and there
are many examples out there, use the GOOG. Also this is a lot of work for a progress bar going
from one page to another, which should not be needed unless you are doing intense processing
of some action or uploading a file.

Javascript complicates code, is browser dependant, and relies on fast computers on the client
end, thus I try to avoid it unless a real biz requirement must be met.

But just to help you out quick because I have the code right here... 

    function updateBar()
        var xmlhttp;
        if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
          xmlhttp=new XMLHttpRequest();
        } else { // code for IE6, IE5
          xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
            if (xmlhttp.readyState==4 && xmlhttp.status==200) {
                if (xmlhttp.responseText == 'SUCCESS') {
                   if (count <= 10) {
                      updateBar(xmlhttp); // UPDATE THE BAR 
                   } else {
                      processSuccess(); // CALL THE SERVER 


>>> SudhirSahoo <> 3/5/2013 10:30 AM >>>

Thank you for your reply.
It would great if anyone provide example code/url/github/svn etc to achieve
this scenario.


View this message in context:

Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail: 
For additional commands, e-mail: 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message