• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

HELP! Exception Processing ErrorPage  RSS feed

 
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 ]
 
Author and ninkuma
Marshal
Posts: 66806
168
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?!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!