I have the following code in an action class:

else if(action.equals("sendMessage"))
 {
     String member = request.getParameter("member");
     RequestDispatcher view =
request.getRequestDispatcher("sendMemberInvite.jsp?member=" + member );
     view.forward(request, response);
}


This code works successfully but is causing the following error in the
tomcat log files

Servlet.service() for servlet action threw exception
java.lang.IllegalStateException: Cannot forward after response has been
committed

Can someone shed some light on why I am getting this error and how I should
handle forward
instructions within an action class. Any help or insight would be
appreciated.

Thanks,
Jeff

Reply via email to