• Post Reply Bookmark Topic Watch Topic
  • New Topic

pageContext.include VS jsp:include VS RequestDispatcher.include

 
Ernest Lee
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pageContext.include VS jsp:include VS RequestDispatcher.include

are they are same or different?
please help!
 
Jim Bertorelli
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RequestDispatcher.include, PageContext.include and jsp's include action. ie. <jsp:include page="copyright.jsp"/> do the same thing.
You would use RequestDispatcher.include in a servlet code while PageContext.include is more convenient a jsp code because pageContext implicit variable is already available. Include action is another way of writing it.

 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!