• 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