JSP Programming - response.getWriter().flush(); doesn't work
===

    <%
    response.getWriter().write("Hello world<BR>\n");
    response.getWriter().flush();
    wait(10000); // 10 seconds
    response.getWriter().write("Goodbye happiness.<BR>\n");
    %>

Expected results: "Hello World" is displayed in the browser. 10 seconds later, "Goodbye happiness." is displayed.

What happens: The page sits there loading for 10 seconds, and then "Hello World Goodbye Happiness" are displayed at the end.

What I want to do is display the status of a long-running operation as different milestones are reached. Is this possible?

I'm using Eclipse EE (with Tomcat) on Windows 7.

Thanks!

Charles.