tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Curwen" <>
Subject using an error page for JSP pages and buffer flushing
Date Tue, 27 Apr 2004 19:53:56 GMT
I've defined an error page in web.xml:


Which works *most* of the time, for displaying that error page when I
have that Exception type.  But every so often, I get a partial HTML
response, and then the source just stops (cuts off).  In the local_host
log I see:

ErrorDispatcherValve[localhost]: Exception Processing ErrorPage

Which means (I'm assuming) that my JSP buffer has been flushed (which is
the partial page that I see in my browser) and the container itself is
causing the java.lang.IllegalStateException when it attempts to send me
off to the error page.
I have a couple questions regarding this area:

1)  I've attempted to add a <%@ page errorPage="/error/locale.jsp" %>
directive, and it seems to do the same thing. So is there no mechanism
that "more deftly" handles errors like this?  Or when we use any sort of
error-handling, will we have to also adjust our page buffer where

2)  I don't like the idea of limiting myself to a single errorPage per
JSP page. There are many types of Exceptions that might occur in a page.
Well, perhaps not in a strict model-2 page ;) So I'd like to handle all
sorts of errors with the error-page mechanism.   Is there an accepted
'best practice' in regards to the usage of errorPage (JSP directive)
and/or error-page (in web.xml)?

mike curwen                    
intermediate programmer
globally boundless

204 885-7733  ext 229

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message