1.

What Is Pre Initialization Of A Servlet?

Answer»

A container doesn't initialize the servlets when it starts up. It initializes a servlet when it receives a REQUEST for that servlet first time. This is called lazy loading. The servlet specification DEFINES the <LOAD-on-startup> ELEMENT, which can be specified in the deployment descriptor to make the servlet container load and initialize the servlet as soon as it starts up. The process of loading a servlet before any request comes in is called PRELOADING or pre initializing a servlet.

A container doesn't initialize the servlets when it starts up. It initializes a servlet when it receives a request for that servlet first time. This is called lazy loading. The servlet specification defines the <load-on-startup> element, which can be specified in the deployment descriptor to make the servlet container load and initialize the servlet as soon as it starts up. The process of loading a servlet before any request comes in is called preloading or pre initializing a servlet.



Discussion

No Comment Found