The forward and sendRedirect methods are no different than any other
Java method call. They have no way of halting the execution of their calling method.
You will need to structure your code in such a way that either forward/sendRedirect OR doFilter is called.