• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference betweem jsp:forward and RequestDispatcher.forward()

 
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).
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!