Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Q on ServletResponse: more ways to commit a response?  RSS feed

 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

A ServletResponse object is valid until committed.
I know flush() of the classes ServletOutputStream
and PrintWriter commit the response, are there any
other ways?

Cheers,

Gian
 
Abhishek Mahanty
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Well flush() explicitly commits a response while there are scenarios where the response gets committed implicitly. e.g.

response.sendRedirect()
response.sendError()

I think there are others too .. may be someone else will add in.

Abhi.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!