On Jan 7, 2008 11:10 AM, Jukka Zitting <[EMAIL PROTECTED]> wrote:
> On Jan 7, 2008 12:06 PM, Carsten Ziegeler <[EMAIL PROTECTED]> wrote:
> >... Yes, I think this is true for the 404 case, but what about other status
> > codes? So perhaps a ResourceNotFoundException makes more sense?
>
> +1 It's better to do the mapping from a ResourceNotFoundException to a
> HTTP 404 response in the Servlet or Filter that initiated the resource
> lookup....

I tend to agree, but how would you handle the 50x (internal server
error) and 30x (redirect) cases?

Maybe using those?

a) HttpInternalServerErrorException (takes an int status parameter for
the exact value + message)

b) HttpRedirectException (takes an int status parameter for the exact
value + message)

I think exceptions also make sense in those cases  - at least a), b)
is more debatable.

-Bertrand

Reply via email to