This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile 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