A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
response flush & close...
Joined: Mar 08, 2005
Dec 14, 2005 10:55:00
Just wondering about the relevance of response.flush() and close();
Does it help the
container/client browser behave by ensuring you have a flush() or a close() after a servlet has done its main business?
Regards, Dave Brown
SCJP 6 - [url]http://www.dbws.net/[/url] - Check out
Author and ninkuma
Joined: Jan 10, 2002
Dec 14, 2005 11:14:00
I think it is best to let the container handle the stream unless you have a good reason to intervene.
[ December 14, 2005: Message edited by: Bear Bibeault ]
Asking smart questions
Books by Bear
Joined: Oct 23, 2005
Dec 14, 2005 12:04:00
There is an autoFlush attribute you can set on the page context to handle this.
In general, though, you only call flush() if you need to send user data during a long running process that has not completed yet. Other than that, you don't have to worry about it.
Down Home Country Coding with Scott Selikoff
I agree. Here's the link:
subject: response flush & close...
when PrintWriter.flush() is called
Error in generating inline PDF
Must close PrintWriter in servlet when done?
file created,but nothing inside
When to use flush() in Java?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013