title: java.lang.IllegalStateException: PWC1227: Cannot forward after response has been committed.....why it was comming?
body: <p>to add some row data into a table, affter submmiting the button i have to show the details(data) in the next page of that regarding table. when i am using <code>RequestDispather</code> class i am getting the <code>java.lang.IllegalStateException:</code>........ it was also comming while using <code>response.sendRedirect("View.jsp");</code>..... i am sending the code what i used in my page.</p>
  
  <pre><code>if(msg.equals("Values Added")){
                   RequestDispatcher rd = request.getRequestDispatcher("View.jsp");
                   rd.forward(request, response);
                   }
  </code></pre>
  
  <p>(OR)</p>
  
  <pre><code>if(msg.equals("Values Added")){
                   response.sendRedirect("View.jsp");
                   }
  </code></pre>