There was recently a post about this issue. The person
was using IE though, and I believe they fixed it with
a patch.
Alternatively, I tend to send a progress refresh back
to the browser when I have a long running process.
Basically, I start a new thread and run the process in
that. Internally the thread updates a string buffer
with messages that tell the user the status of the
running process. Then I put the thread object in
state. I send a page back to the user trhat contains
the buffer messages plus a refresh tag.
The page comes back and then periodically refreshes
with new data from the message buffer, until the
process completes. Then the complete message buffer is
returned with a completion announcement and no refresh
tag.
Wasthatamouthful,itfeltlikeit.
//Nicholas
--- Sean Snyders <[EMAIL PROTECTED]> wrote:
> Hi,
>
> The following situation exists:
>
> I have a servlet that answers a request from a
> browser (the browser sending
> a request eg:
>
>
http://host:8080/servlet/myServlet.class?QueryField=some_param_here)
> I then have ALOT of information to process and as
> they are processed I write
> them to the OutputStream
> of the response as such:
> first getting the outputstream:
> PrintStream outputStream = new
> PrintStream(response.getOutputStream());
> I then write to the stream like this:
> outputStream.println("<br> FINITO !");
> But this all occurs during processing done by my
> servlet.
>
> My browser, during all of this comotion, says
> "waiting for reply", is this
> correct, because I get a TIMEOUT error
> which terminates my servlet? Where does this error
> originate? Whilst I am
> writing to the outputstream the output doesn't
> appear
> on the browser. Only when the service method ends
> (when it doesn't timeout)
> it all appears on the browser. I've tried flushing
> the stream but to no
> avail. Why is this ?
>
> PLEASE HELP.
>
> Thanx.
>
> Sean.
>
>
>
> -: Sean Snyders
> -: mailto:[EMAIL PROTECTED]
> www.cs.sun.ac.za/~snyders
> -: Computer Science Department ph:
> +27-21-808-4393
> -: University of Stellenbosch fax:
> +27-21-808-4416
> -: Republic of South Africa
>
>
___________________________________________________________________________
> 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
>
=====
"Piper, Piper the red red worm
awoke last night to the sound of the storm
the words are the words I sailed upon."
Piper, Phish
--
Nicholas Whitehead
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
___________________________________________________________________________
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