• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference betweem jsp:forward and RequestDispatcher.forward()  RSS feed

 
Brij Garg
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

How jsp:forward and RequestDispatcher.forward() are different from each other ?

Thanks in advance. []
 
Abhijeet Nalawade
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jsp:forward> element forwards the request object containing the client request information from one JSP file to another file.

The forward method of RequestDispatcher will forward the ServletRequest and ServletResponse that it is passed to the path that was specified in getRequestDispatcher(String path). This method is useful for communicating between server resources, (servlet to servlet).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!