Hello list readers, I have another servlet question.
Is it in any way possible to send the HTTP response from a servlet *before*
its
doGet() method finishes? In other words, when we have...
public void doGet(HttpRequest request, HttpResponse response)
{
long t;
PrintWriter out = response.getWriter();
out.setContentType("text/plain");
out.println("Hello world!");
out.close();
t=System.currentTimeMillis();
do;
while (System.currentTimeMillis)<t+10000); // wait for 10 seconds
}
...is it in any way possible to have the browser get the "Hello world!" text
*immediately* after the method has written it and closed the PrintWriter,
*without* having to wait 10 seconds?
"Why do I need this?" you ask. It's because I want the doGet() method to
output
some text to the browser, then access another Java object with a query, and
hang
around waiting to see the results. The browser should get the text before the
other Java object gives its results. Is this possible, or will I have to make
some work-around?
Please advise, thanks.
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