cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brian moseley ...@maz.org>
Subject Re: Error Handling
Date Mon, 06 Dec 1999 01:55:22 GMT
On Mon, 6 Dec 1999, Stefano Mazzocchi wrote:

> brian moseley wrote:
> > 
> > this is where i use the apache custom_response/internal
> > redirect mechanism to great advantage in my mod_perl
> > applications - when im processing an exception i select an
> > error uri and set up an internal redirect to it. i get to
> > stuff the exception message in the request notes table so
> > that it's available to the 2nd request.
> > 
> > im not terribly knowledgable about the servlet api, but it
> > looks we could do something similar in cocoon by modifying
> > the request and having the request dispatcher forward it?
> 
> Yes, that could be a solution. I'll try different ways
> out in the next few days.

hm but doesnt RD.forward() break if the request body has
already been read, or at least not see any request body? is
it possible to re-set the request body?

> Also, what about having an HTTP error code set when
> something bad happens? what should we use?

in the application i described above, i always set to 500,
cos the ErrorDocument i've configured for 500 knows to look
in the notes table for an exception message. it also looks
in the err_headers_out for a special header. of course we
dont have any way to access these apache-specific constructs
through the servlet api, so returning a 500 is less
appealing. id rather my application internally recognize an
exception and serve a 200 response containing
exception-handler-generated content.


Mime
View raw message