SiSi'mon a écrit :
> I have the following:
>
>     <error-page>
>         <exception-type>java.lang.Throwable</exception-type>
>         <location>/web/error/Throwable.jsf</location>
>     </error-page>
>
> but there are myfaces / spring and hibernate exceptions being thrown and it
> is not being sent to this xhtml page.  any ideas?
>   
All exceptions that get out of the Servlet that handled a request are
redirected to error page by container. However, there is one case, i
encountered it using struts tiles, where an exception make it out of
servlet but does not reach client screen. It's when servlet already
started to flush response to client. At this time it's impossible to
send an error page. However, exception does anyway reach the logs. So,
for jsf, if your exception occurs in render response face, no way to get
it on screen with basic configuration.
One way around this is to prevent servlet from sending response to
client until it wrote all response to a buffer. You can, for example,
add a servlet filter that wrapps the responseWriter to a
byteArrayOutputStream. This way, only when servlet returned properly
from process you send response to client. But this buffering has a
price, if response is 600K you need 600K ram during request.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to