exception handling for filter in spring -


i handling exceptions in spring using @exceptionhandler. exception thrown controller caught using method annotated @exceptionhandler , action taken accordingly. avoid writing @exceptionhandler every controller using @controlleradvice annotation.

everything works fine expected.

now have filter(yes, not interceptor, handle requirement) implemented using delegatingfilterproxy , contextloaderlistener.

when throwing same exception above filter, not caught way done in controller case. directly thrown user.

what's wrong in here?

filters happens before controllers resolved exceptions thrown filters can't caught controller advice.

filters part of servlet , not mvc stack.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -