File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes What are ServletConfig, ServletContext ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "What are ServletConfig, ServletContext ?" Watch "What are ServletConfig, ServletContext ?" New topic

What are ServletConfig, ServletContext ?

Jess Ishasder

Joined: Feb 19, 2002
Posts: 21
I don't know much about the differences between two?
Under what situations that I should these two classes?
indira mandapati

Joined: Feb 15, 2002
Posts: 14
Servlet container uses ServletConfig object to pass the information during its initialization.ServeltConfig object will have servletContextObject.
You can get initialization params and ServeletContext object from ServeletConfig object.
ServeltContext Object is used by servelets to communicate with servelt container.look in api
to see the methods.
A webapplication( having servelts,beans,jsp)will have one servletContext can be placed in servletContext instance inorder to be shared by entire webapplication.
I agree. Here's the link:
subject: What are ServletConfig, ServletContext ?
It's not a secret anymore!