Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

commiting response

 
Sharath
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone tell me when will a response be commited exactly ?
 
dennis zined
Ranch Hand
Posts: 330
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to Hanumant Deshmukh, et al. book, it is committed after calling the flush method of the PrintWriter object.

On a different note, the book mentioned that calling the sendRedirect method after a response has been committed will throw an IllegalStateException. I tried that and it did not throw any exception. It just did not redirect.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic