I don't know much about the differences between two? Under what situations that I should these two classes?
posted 13 years ago
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.