You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by SiSi'mon <s_...@purpleblade.net> on 2007/05/23 21:53:29 UTC

not working

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?
-- 
View this message in context: http://www.nabble.com/%3Cerror-page%3E-not-working-tf3806142.html#a10771494
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: not working

Posted by gb1071nx <gb...@globallyboundless.com>.
Is it possible you're running into any of : 
http://issues.apache.org/bugzilla/show_bug.cgi?id=42434
http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4
http://issues.apache.org/bugzilla/show_bug.cgi?id=40135
 

> -----Original Message-----
> From: David Delbecq [mailto:delbd+jakarta@oma.be] 
> Sent: Wednesday, May 23, 2007 3:26 PM
> To: Tomcat Users List
> Subject: Re: <error-page> not working
> 
> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: not working

Posted by David Delbecq <de...@oma.be>.
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org