my dog learned polymorphism
The moose likes Servlets and the fly likes why we can't get RD from config? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "why we can Watch "why we can New topic

why we can't get RD from config?

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Why we can get RequestDispatcher from Servlet Context? or rather Why we can't get RequestDispatcher from Servlet Config?

ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

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

I agree. Here's the link:
subject: why we can't get RD from config?
It's not a secret anymore!