There are a couple of things you can do. I haven't tried this, but I think you can prevent the IllegalStateException by putting "<%@ page buffer='128kb' %>" in the JSPs. Use a big enough buffer, and it won't start writing the response before it tries to redirect to the error page.
Also, you could catch exceptions in your JSP and print out some diagnostic info there. Seems like a pain to add another error handling scheme when you've already done it the "right" way, but oh well. I agree that it would be nice if the initial exception was logged. -- Len On 3/27/06, David Delbecq <[EMAIL PROTECTED]> wrote: > Am i correct assuming tomcat is unable to correctly redirect to error > page when an error occur in an included jsp? > > I have an included jsp that most probably generate an error (error was > not occuring before inclusion). However, my error page don't get > displayed. All i get is a partial jsp page (the one doing the inclusion > of buggy jsp), and a message in console stating > > org.apache.catalina.core.ContainerBase.[Catalina].[localhost] - > Exception Processing ErrorPage[exceptionType=java.lang.Exception, > location=/jsp/error.jsp] > java.lang.IllegalStateException > at org.apache.coyote.Response.reset(Response.java:296) > at org.apache.catalina.connector.Response.reset(Response.java:642) > at org.apache.catalina.connector.Response.reset(Response.java:908) > at > org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:355) > at > org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:211) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738) > at > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526) > at > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) > at java.lang.Thread.run(Thread.java:534) > > But i don't get the original exception, so i seems to have no way to > find out where my jsp did a mistake. > I can assume the error redirection failed because result was already > partially send. This is an acceptable behaviour. But what i think is > unacceptable is the impossibility the get the original Exception. All i > can get as information is that tomcat tried to gove me information on an > error but failed. Great! Shouldn't it at least display the stackTrace of > original error in console??? > > Anyway to get to the original error? > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]