• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot forward after response has been committed

 
Nila dhan
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the reason for this exception to occur. 'cannot forward after response has been committed'
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
forward means "I want to reply with this resource and nothing else".

Responses get buffered, and once that buffer fills up and gets sent to the client it is too late to decide to send them something else instead.

Hence calling 'foward' after you are already committed to sending another response is an illegal operation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic