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

Q on ServletResponse: more ways to commit a response?

 
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic