IllegalStateException: Cannot forward after response has been committed ?
hii Servlet experts...
I am looking for some help about this exception..
"java.lang.IllegalStateException: Cannot forward after response has been committed
util.UtilManager.forwarder(Unknown Source)
"
This is the code that I call the method "forwarder"
if (isOk == true)
UtilManager.forwarder("/abc/def/klm.jsp",request,response,getServletContext());
and this is the method "forwarder" ...
public static void forwarder(String path,HttpServletRequest request, HttpServletResponse response,ServletContext context)throws ServletException, IOException
{
RequestDispatcher dispatcher=context.getRequestDispatcher(path);
dispatcher.forward(request,response);
}
I have no idea about why tomcat gices that excepiton about that method...
I am using in inside the Servlet, not in JSP...
As for the duty of the Servlet, I am taking some values from request, and send them to some other methods of other classes, and finally, as a result of these actions, I call the forwarder method to go some appropriate jsp files ...
what is wrong about it ?... where is the missing part ? ..
Thanks..

