You see it is very Simple.
ServletConfig is basically used for configuring individual servlet. Si in a nut shell it is used for servlet specific
configuration. That is why you write <init-param> inside the <servlet>tag.It's specific to individual servlet.
ServletContext is more of a Global object.It is global to application object. If you want object to be shared by all
instances (actually
thread) of servlets that run in an application you write it in ServletContext. That is why you write
<context-param> tag inside <web-app> tag. Not inside <servlet> in DD.
I hope it has solved the problem.
Read Head First. It's clearly mentioned.