Answered Questions

  • What is the difference between ServletContext and ServletConfig?

    Both are interfaces. The servlet engine implements the ServletConfig interface in order to pass configuration information to a servlet. The server passes an object that implements the ServletConfig interface to the servlet's init() method.The ServletContext interface provides information to servlets regarding the environment in which they are running. It also provides standard way for servlets to write...

    jawaharl0207

    • Oct 22nd, 2009

    ServletConfig gives the information about the servlet initialization, it is an interface, where as ServletContext holds the information about whole application(project), the servlet container will create the object of ServletContext. Each servlet has its own ServletConfig object.