cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: servlet destroy() method in Cocoon
Date Wed, 05 Nov 2003 14:33:06 GMT
<extremely-off-the-top-of-my-head>

Doesn't the servlet specification allow to redirect to a page when 
certain exceptions are thrown? If a request is interrupted you will get 
something like
java.net.SocketException: Software caused connection abort: socket write 
error
         at java.net.SocketOutputStream.socketWrite0(Native Method)
         at 
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
         at 
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:668)
.....

Another thing might be to use try and propagate this error (don't ask me 
how) through to  the <map:handle-errors> section of your sitemap.

I guess trying to catch this exception is key here

</extremely-off-the-top-of-my-head>

Sylvain.Thevoz@swisscom.com wrote:

> Hello,
> 
> Is there a location in Cocoon to define a destroy() method like in Servlet programming?
> 
> The goal is to close a database connection when the user press the "stop" button on the
browser during an execution.
> 
> Is someone has an experience?
> Thanks
> Sylvain
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message