Hi
I am facing one problem regarding response.sendRedirect . I am committing the response by using out.flush() , and then redirecting to some
jsp file . In my opinion , it should throw
IllegalStateException , but it does not.
Please help.
code is as follows:-
public void doGet(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {
PrintWriter out = response.getWriter();
out.flush();
if(response.isCommitted() )
{
out.write("response is committed");//prints this line
}
response.sendRedirect("/JSP/time.jsp");
return ;
}
Thanks ....