Several people on this list have mentioned the method flush() of the
PrintWriter belonging to a HttpServlet's HttpResponse. This seems to work
right
only on plain text files, not markup languages like HTML or WML (Wireless
Markup Language).
Suppose I have this kind of code in my servlet's doGet() method...
out.println("Please wait...");
out.flush();
long t=System.currentTimeMillis();
while (System.currentTimeMillis()<t+10000); // wait 10 seconds
out.println("Finished.");
out.close();
If I have set the content-type to text/plain, it works like it should, the
text
"Please wait..." arrives right away and after 10 seconds, the text "Finished."
arrives. However, if I change the content-type to text/html, the browser just
waits 10 seconds, and then both lines arrive. It is the same with WML. As the
services I'm developing need markup languages, not plain text, I need some way
to output HTML or WML content with the flush() method, or a similar method. Is
there any way to do this?
Joona Palaste
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html