Sunday, 22 June 2014

ServletConfig Vs ServletContext

  1. ServletContext object is global to entire web application. Where as ServletConfig object is one per servlet class.

  2. As long as web application is executing, ServletContext object will be available, and it will be destroyed once the application is removed from the server. 
     
    As long as a servlet is executing, ServletConfig object will be available, it will be destroyed once the servlet execution is completed.

  3. The Servlet Config Parameters are unknown to other servlets, since these are specific to a servlet.


                                                             Home

No comments:

Post a Comment