File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes servletContext& ServletConfig Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servletContext& ServletConfig" Watch "servletContext& ServletConfig" New topic

servletContext& ServletConfig

Sivasankar Dhandapani

Joined: Aug 06, 2005
Posts: 1
When we need to servletContext and ServletConfig , in what way it will help , when we go for servlet as controller?
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39529
- to get init parameters
- to get application resources
- to get request dispatchers
- to get application attributes

... and more, but a quick look at the API will show you what can be done through those interfaces.

Ping & DNS - updated with new look and Ping home screen widget
Amarender Reddy
Ranch Hand

Joined: May 12, 2005
Posts: 54
servlet config cannot communicate directly with the servlet container.

so it uses servlet context as a medium to talk to servlet container to avail

varoius services

Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Ulf Dittmer:
but a quick look at the API will show you what can be done through those interfaces.

Yes. There is no other better substitute.
I agree. Here's the link:
subject: servletContext& ServletConfig
Similar Threads
servletConfig and servletContext
Why Init() method
Diff between ServletConfig and ServletContext
Constructor in servlets
Where does ServletContect come in the hierarchy ?