Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • Don't throw an exception. do whatever you need to do with the HttpServletResponse passed as argument to the filter method. Note (and it's also true for all your exception handlers), that sending back a response with an OK status is really not the appropriate thing to do. 401 is the correct status code to signal an euthentication problem. Commented Jul 14, 2019 at 14:39