different ways in which the response can be commited in servlets ??
sid sree
Ranch Hand
Joined: Jun 28, 2007
Posts: 186
posted
0
hi
what are the different ways in which the response can be commited in servlets ??
one method that does this is the flushBuffer() method
Can someone state the other cases in which the response is comitted .... or some logic or rule which helps us predict this ??
Amol Nayak
Ranch Hand
Joined: Oct 26, 2006
Posts: 218
posted
0
ServletResponse has a method isCommitted which returns true when the response is committed.
You can check this before setting any response header, codes, forwarding the request or redirecting the request to different url.
Hope this helps your cause..
sid sree
Ranch Hand
Joined: Jun 28, 2007
Posts: 186
posted
0
Hi
Ya did know of that method ... but the question was from a exam point of view ..what if we are given a code sniplet and asked when the response will be committed ??
So if we could get some rule or logic as to when the response is it would be usefull
Ya did know of that method ... but the question was from a exam point of view ..what if we are given a code sniplet and asked when the response will be committed ??
So if we could get some rule or logic as to when the response is it would be usefull
Thanks
I think even when you set some headers to the response (like setContentType etc) its like the response is committed. Is that right?