File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RequestDispatcher

 
Raghavendra Holla
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
What is the difference between RequestDispatcher's forward method and include method? In which context each can be better utilised.
Thanks in adavnce for your help.
Regards,
Holla
 
Sagar Sharma
Ranch Hand
Posts: 92
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
forward : should be used only when u have not started replying to the client by ServletOutputStream or the PrintWriterStream.
include : can be used before or after the servlet has used either of the two mentioned above.
Also note that the resource called cannot set the headers, if it tries to do so then the result is not guaranteed.
HTH
sagar
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic