S G wrote:
>
> how would i get out of the infinite while loop just by hitting
> the stop button in my browser in the following code ?
>
Eventually, one of the writes to the output stream will
result in a buffer flush, and your servlet code will get
an io exception since the browser isn't listening anymore.
Eventually might be a long time, though, depending on
things like the servlet engine's output buffer size, whether
you're using a front-end web server, and whether there are
any intermediate proxies between you and the client.
Writing infinite pages is generally a bad thing.
Whether your loop produces output will depend on your
browser. Some browsers want to buffer up a whole page
before it's displayed, others display html immediately
as they receive it.
Hmmm, looks like you're writing illegal html (data after
the html close tag) so no way to be sure what would happen
in general. A better example might be an infinite table,
since you sometimes get very large tables in real life,
and can run into similiar sorts of buffer problems.
--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.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