Am Dienstag, den 18.12.2007, 17:19 +0100 schrieb Bertrand Delacretaz:
> On Dec 18, 2007 4:37 PM, Felix Meschberger <[EMAIL PROTECTED]> wrote:
>
> > ...we could make it even simpler: we just
> > look for an "error" script or servlet, like this:
> >
> > Servlet s = resolveScriptOrServlet("error");
> > if (s == null) {
> > s = defaultErrorHandlerServlet;
> > }...
>
> And let the script decide based on the status code and/or Throwable?
>
> I'd be ok with that if the script has a way to delegate to the default
> handler, say:
>
> if(httpStatus == 404 ) {
> // handle this here
> } else {
> delegateTodefaultErrorHandlerServlet();
> }
>
> Where delegateTodefaultErrorHandlerServlet could be just a forward to
> the default handler servlet, right?
As we use plain old script resolution to find the error handler, it
might also be conceivable, that we would want a less specific error
handler for non-404 errors etc. given all these special cases, that
might come up, I would rather get back to my initial proposal of having
per-status code handlers and per-throwable (supporting class hierarchy)
handlers.
Regards
Felix