| Author |
When is a response committed
|
Nila dhan
Ranch Hand
Joined: Sep 15, 2005
Posts: 160
|
|
|
I am not sure if my question is correct or incorrect.When is a response committed?I mean under what circumstances?
|
 |
Scott Selikoff
Saloon Keeper
Joined: Oct 23, 2005
Posts: 3666
|
|
If by committed you mean sent to the user, it happens at the end of a servlet call or if a flush() of the output stream is invoked. One common use of flush() is to output data to the screen for the user to see before a long process is complete, such as a task that would require the user to wait 5 minutes. Its preferable to give them an update status during that 5 minutes than having them watch a screen that just says 'loading'.
|
My Blog: Down Home Country Coding with Scott Selikoff
|
 |
Nila dhan
Ranch Hand
Joined: Sep 15, 2005
Posts: 160
|
|
The response is also committed when the buffer gets filled if i am right. Are there any other cases when a response is committed without calling flush or forwarding the response?
|
 |
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
|
|
|
Nila, you are correct. If in the process of writing to the response the buffer gets full, it will be implicitly flushed.
|
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
|
 |
 |
|
|
subject: When is a response committed
|
|
|