ServletConfig

  •  This object is used to store the configuration details of a particular servlet like logical name of the servlet, initialization parameters and so on...
  • Using servlet config we will get to know the complete view of a particular servlet.
  • Servlet Config will be instantiated during the initialization of the Servlet. 
Loading => static block 

instantiation  => public zero arguments constructors 

initialization => public void init (ServletConfig config) throws SE

Request Processing => public void doXXXX(HSR request, HSR response) throws SE, IOE

De Instantiation =>  public void destroy()

  • Servlet Config object is specific to a particular servlet.
  • Servlet Config object will be destroyed just before the Servlet Deinstantiation.
  • We can add only parameters data inside the config object.
  • In web.xml <init-params> will be placed under servlet class level as it is specific to particular servlet and the data present in one servlet config object cannot be accessed by other servlets.

Comments

Popular posts from this blog

Advantages and Disadvantages of Monolithic Architecture

Monolithic Architecture

Eclipse debugging