Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

response flush & close...

 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Just wondering about the relevance of response.flush() and close();

Does it help the servlet container/client browser behave by ensuring you have a flush() or a close() after a servlet has done its main business?

Rgds,

Dave
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Scott Selikoff
author
Saloon Keeper
Posts: 4010
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic