This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why we can't get RD from config?

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why we can get RequestDispatcher from Servlet Context? or rather Why we can't get RequestDispatcher from Servlet Config?

Thanks.
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A ServletConfig object is used to serve initialization info to the Servlet. A ServletContext object is the one that's used by the Servlet at runtime to dynamically get handle to other context resources/objects. Both serve two different purposes.

You can theorotically, get a RD object from config too (see below), though it would actually access the context object for this



ram.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic