I have a MVC restful spring application set up. I have an interceptor, @Controller, and @ExceptionHandler. When processing a correct request, everything works fine:
- preHandle
- Controller
- postHandle
- View
- afterCompletion
But when an exception occurs in the Controller, the postHandle is skipped:
- preHandle
- Controller
- ExceptionHandler
- ExceptionView
- afterCompletion
Is there a way to retain or manually call my postHandle stack when catching exceptions? Alternatively is there a way to specify that afterCompletion should be called with the Exception I've caught and handled? (I believe the Exception parameter to afterCompletion is normally set when the View throws an exception.)
Thanks!


Reply With Quote
