title: response.sendRedirect() from Servlet to JSP does not seem to work
body: <p>I am writing a client server program. I am sending an arraylist from an android phone and I am able to receive the list also. After that I want the servlet to redirect to <code>demo.jsp</code> using <code>response.sendRedirect()</code>, but it just won't redirect. Tried with <code>requestDispatcher.forward()</code> too. </p>
  
  <pre><code>ObjectInputStream in = new ObjectInputStream((InputStream) request.getInputStream());
  List&lt;Double&gt; al=(List&lt;Double&gt;)in.readObject();
  in.close();
  for(int x=0;x&lt;al.size();x++)
  {
      System.out.println("List");
      System.out.println(al.get(x));
  }
  System.out.println("going to demo.jsp");
  response.sendRedirect("demo.jsp");
  </code></pre>
  
  <p>How is this caused and how can I solve it?</p>