Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HELP! Exception Processing ErrorPage

 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting a weird error and I'm not sure why. I have an error page set which contains the following:

It keeps throwing an exception (as I see in the log messages) of type java.lang.IllegalStateException. It says: "Exception Processing ErrorPage"
This error even happens when I try to go to a page that doesn't exist (i.e. a 404) so I know it's not because of me trying to mess with the response. And I get the error even if I take all code out of my error page!
Any ideas?
[ January 06, 2004: Message edited by: Robert Paris ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it perhaps the "response already comitted" exception?
bear
 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see how since it throws this exception even on a 404 error. Why does it throw a "committed" error? What can I do to fix this? It's even doing it on a 404!
Here's the full error:

[ January 06, 2004: Message edited by: Robert Paris ]
 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, did some more testing and here's something weird:
If I set errorPage="errorHandler.jsp" in my web page that's throwing an error, then it includes the error page output. However, 404 errors still don't work! Please, someone help me!
 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, still got a problem but it gets more interesting. I was using Tomcat 4.1.24. When I switched to Tomcat 4.1.29 the 404 problem went away. Now on a 404 error, it displays my errorHandler.jsp page.
Unfortunately, when I throw an exception in my JSP page it still cannot go to my errorHandler.jsp page - it still throws the IllegalStateException. It's because the exception gets thrown part-way down the page so I guess the response has some data already written - is there a way to change that? And why does the spec allow setting an error-handling page via the web.xml descriptor for JSP pages if it won't work?!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic