Seeing this question and
your other question, I think that you don't understand how the HTTP request-response cycle works with regard to servlets.
It works like this:
User enters an URL in the browser. Browser sends an HTTP request to the server.The app server (Tomcat for example) calls your servlet to handle the request.The doGet() method in your servlet generates an HTML page and returns.The app server sends the generated page back to the browser in an HTTP response.The browser on the user's computer displays the HTML page. Note that generating the page by the servlet and rendering the page in the browser are two separate steps, that happen one after the other. So, the browser is not rendering the page while the code in your servlet runs - that happens after the servlet has finished.
If your servlet sends e-mails, then the resulting HTML page which shows the status is not sent back before the servlet is done with all the e-mails. You can't show the progress by making the servlet print something to the output, because the output won't be sent back to the browser before the servlet is done.
One way to show a progress bar is to program it in JavaScript (running in the browser), with AJAX (where the JavaScript is sending to and receiving requests from the server to check the status).
[ October 18, 2008: Message edited by: Jesper Young ]