java.lang.IllegalStateException in Java Servlet

When response.sendRedirect() is not the last statement in Servlet to be executed and its embedded in between your business logic i.e after response.sendRedirect(), if some function or business logic is continued this exception will be thrown by the java servlet. So, it should be the last statement otherwise it should return null after redirecting.



Related Posts: