Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request Dispatcher

 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
I have read about Request dispatcher from Servlet API, but i still confused.
What are the differences between method getRequestDispatcher(String path) and getNamedDispatcher(String path) in Servlet Context class?
thanks
daniel
 
Bhushan Jawle
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getNamedDispatcher takes parameter as name (e.g. servlet name defined in web.xml) against path in getDispatcher
Hope that helps
 
Ken Januski
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just curious as to whether one is used more than the other. From what I've read it looks like getNamedDispatcher is not mentioned as much in books. Does this mean that it's used fairly infrequently and that most people use getRequestDispatcher? Or is getNamedDispatcher also used fairly frequently?
I know this isn't directly related to certification but I'm just curious.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic