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

IllegalStateException in forward

 
Ronaldo Luiz
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was trying to test the example of this tutorial: WTP Tutorials - Building a School Schedule Web Application.
This exception has been throwed when trying to execute the forward below.
java.lang.IllegalStateException: Cannot forward after response has been committed

getServletContext().getRequestDispatcher("/Schedule.jsp").forward(request, response);

 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.IllegalStateException: Cannot forward after response has been committed

That means what it says - something flushed the response output buffer - I suspect the code:

What is that in there for/
Bill
 
Ronaldo Luiz
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I removed this and the problem was resolved.
The strange thing is that when I run the eclipse wizard to override a method, the wizard put this line automatically.
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, the power of a smart IDE and its ability to break a simple program...

I am not an Eclipse expert, but most "smart" IDEs have a place where you can modify the templates and remove the call to super...

Personally, I hate using wizards for problems just like that!
 
sureshreddy puli
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try to work on Eclipse IDE. It saves your valueable time.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic