Servlet filter runs in infinite redirect loop when user is not logged in
This AuthenticationFilter also runs when login.html is being requested. However, the code is redirecting to login.html once again instead of continuing the filter chain. This explains the infinite redirect loop. You need to let the filter just continue the request if the currently requested page is already the login page itself. E.g. public void doFilter(ServletRequest … Read more