i need to monitor the progress of servlet's treatment.
i have a while loop executed in the servlet and i need to know the progress of its counter via the JSP page, this counter will be a progress bar counter so the user can know the servlet's progress.
so what i want to know how to get each counter's valus via JSP
Please help it's urgent
The difference is that if the request to the long-running servlet is made via Ajax, it is happening asynchronously and script on the page continues to run. Once you submit a form, the page unloads.
While an Ajax request is active, you can issue other Ajax requests that can call the server and monitor the progress of the longer-running servlet -- assuming, and this is the big complication, that that servlet is somehow able to make its progress known to the other requests. It could record progress in the session, or perhaps the DB, and the "status servlet" could read that progress and report it back to the page.