It is caused by the fact that response.sendRedirect is not the last statement in Servlet to be executed and its embedded in between your business logic i:e after that some function or business logic is continued. So, it should be the last statement otherwise it should return null after redirecting.
eg.
response.sendRedirect(“abc.jsp”);
return;
