jQuery in Action, 2nd edition*
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
Author

What are ServletConfig, ServletContext ?

Jess Ishasder
Greenhorn

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
Greenhorn

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 instance.info can be placed in servletContext instance inorder to be shared by entire webapplication.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What are ServletConfig, ServletContext ?
 
Similar Threads
Unexpected Exception
difference between throw and throws
arrays
Man awarded 3 BILLION in smoking case
The difference of start rmiregistry by API and Command line