Hi, as Bear Bibeault said your topic is generic and you must post a more specific question, but I give you a generic answer and example, The ServletConfig is a interface that have methods to get information releted only to the servlet, as its name, and init parameters. The ServletContext is a more generic interface is as an ApplicationContext, it's generic for the whole application, with this interface you can get the global init parameters set an get attributes that are visible for the all application, and more. I give you an example.
I hope this help you
Kind regards
Cesar