difference between servletconfig and servletcontext in java
ServletContext is implemented by the servlet container for all servlet to communicate with its servlet container, for example, to get the MIME type of a file, to get dispatch requests, or to write to a log file.
ServletConfig ServletConfig is implemented by the servlet container to initialize a single servlet using init().
ServletContext : Defines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log file.The ServletContext object is contained within the ServletConfig object, which the Web server provides the servlet when the servlet is initialized .
ServletConfig : The object created after a servlet is instantiated and its default constructor is read. It is created to pass initialization information to the servlet.