At a minimum, handle() should be something like:
public void handle( Request request, Response response ) {
init( request, response );
beforeHandle( request, response );
if ( response.getStatus().isSuccess() ) {
doHandle( request, response );
if ( response.getStatus().isSuccess() )
afterHandle( request, response );
}
}
although I'd still prefer the use of exceptions.
- Paul
On Jan 9, 2008, at 10:23 PM, Paul J. Lucas wrote:
And to make matters worse, Filter.handle() is final, so I can't
override it to fix it. Sigh....
On Jan 9, 2008, at 10:12 PM, Paul J. Lucas wrote:
If I write my own filter and use its beforeHandler(), I would like,
upon some catastrophe, to abort the entire request and return some
client error code.
Unfortunately, it doesn't appear that the API for Filter allows
aborting a request. True?
This is another good case for using exceptions.