Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

response committed error  RSS feed

 
rebecca bielecki
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the following error, "ERROR: Cannot forward. The response has already been committed.", when I attempt to access beans within my jsp pages. The beans were always accessed within the pages ... but as instances of different beans. I have actually created one bean that is general enough to perform all tasks, have instantiated 4 instances of it in my controller servlets init() method and have added it to the ServletContext so as to make it available application wide.
I have no idea what the error message relates to, only that I get it on all pages that are using the beans ... except for the start, index.jsp, page.
I know that the error indicates that the response body has been written to ... but I don't know how that has occurred or why. Can anyone give me any indication of the most common situation/s where the response body will be written to.
Any assistance at all would be greatly appreciated.
 
Tim Holloway
Bartender
Posts: 18712
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means that you've already started sending output to the client before you issued the forward request. Since there's no way to recall the output, and the forwarded page doesn't match the output already sent, it throws an exception.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!