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

Servlet Chaining & RequestDispatcher

 
Naveen Chandra
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Could someone pl. brief about the difference between
RequestDispatcher's forward() method and Servlet Chaining.
If both does the same functionality then why should we configure
the server for Servlet Chaining ?
Thanks in advance,
Naveen.
 
Sean MacLean
author
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the concept of 'chaining', as it relates to configuring the server instead of using the forward() method, is that you can configure certain types of requests to activate a particular chain of servlets. For instance, if a request is from within an Intranet you might want the users to see some internal advertising. So you could have all these requests go through as "AddInternalBanner" servlet first. The forward() method is useful if a particular servlet decides it should pass the request along. Have a look here for more info.
http://sern.ucalgary.ca/Courses/CPSC/547/W2000/webnotes/Servlets/servlets.html
I hope this clears things up a bit
Sean
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic