| Author |
HELP! Exception Processing ErrorPage
|
Robert Paris
Ranch Hand
Joined: Jul 28, 2002
Posts: 585
|
|
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
Joined: Jan 10, 2002
Posts: 56204
|
|
Is it perhaps the "response already comitted" exception? bear
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Robert Paris
Ranch Hand
Joined: Jul 28, 2002
Posts: 585
|
|
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
Joined: Jul 28, 2002
Posts: 585
|
|
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
Joined: Jul 28, 2002
Posts: 585
|
|
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?!
|
 |
 |
|
|
subject: HELP! Exception Processing ErrorPage
|
|
|