At 02:06 PM 8/20/99 +0200, you wrote:
>--- Re�u de       RENEXTER.ARCHAISY ARCHAIMBAULT SYLVAIN S* 20/08/99 14.06 --
>
>You should have a flush method on response object which enables you to do
>what you want.
>
>  sly

I don't. I checked the file jsdk2.0\src\javax\servlet\http\
HttpResponse.java and there is no mention of a flush method. Is this a
JSDK2.1 method, or have you just dreamed it up?

Joona Palaste

>-----------------------------------------------------------------------------
>
>From: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Date: Fri, 20 Aug 1999 14:49:47 +0300
>Subject: Sending HTTP response before finishing doGet()?
>
>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

Reply via email to