Am working on an application which has a requirement to download bulk data from a file server with a maximum file size constraint fixed at 3 Mb.It means i would have a maximum download capacity of 3Mb.I am writing the input stream to the response output stream .My problem is I need to redirect my response to a jsp page after I downlaod.Now when I redirect using the code from my servlet..I get a java.lang.IllegalStateException: Cannot forward after response has been committed
RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/save.jsp");
rd.forward(request, response);
How can I redirect.Will downloading in a separate thread help me .Please advice ....