File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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?