• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RequestDispatcher.forward or Response.sendRedirect?

 
Rohit Malhotra
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am kinda write a file upload Application where the User gives the input file and the Servlet uploads it and now i want to transer the control back to the JSP allowing more files to be uploaded.
What should i use. RequestDispatcher.forward("UserTasks.jsp") or response.sendRedirect("UserTasks.jsp");
Also when i try using response.sendRedirect i keep on getting this error:=

java.net.SocketException: Software caused connection abort: socket write error

My jsp page is in the Application root directory and the servlet classes are in root\web-inf\classes directory..
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the JSP page is within the same application use RequestDispatcher.forward
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic