"this" is refered to servlet,servlet have both getServletConfig() and getServletContext(),first one return a ServletConfig,second one return a ServletContext,ServletConfig has a method named getServletContext,which return a ServletContext,and ServletContext has a method named getInitParamter() retrive init parameter. am i clear?
1.* So the first one is getServletConfig(). that is one called from GenericServlet and further we can get ServletContext on called getServletContext() on object of ServletConfig as it is having one and that is implemented in GenericServlet
2.** In second case, this is used to get ServletContext as the method is declared in ServletConfig and defined in GenericServlet.