Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IllegalStateException- Doubt

 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I have a JSP file with the following code:

I'm wondering that why am I not getting a, IllegalStateException here?
I just get to see a page with contents just before the forward call...
Pls. help..
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use errorPage for your page and print exception implicit object in error page and you will get following exception
"java.lang.IllegalStateException: Error: Attempt to clear a buffer that's already been flushed"
 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Gowher...I got it running...but I don't understand that why do I need to explicitly set an error page in the JSP file. However, if you try to call sendRedirect() after calling forward() then in that case we don't have to set any error page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic