WAS v8.5 > Administering applications and their environment > Administering the Liberty profile > Administering the Liberty profile manually > Administering web applications on the Liberty profile

Specify when servlets are loaded and initialized

By default, the Liberty profile defers servlet loading until a request is received for the associated web application. You can override this default behavior by specifying the web container deferServletLoad attribute to false.

The servlet specification defines the load-on-startup servlet attribute, which is specified in the web.xml file of a web application. If a servlet has a non-negative value for the load-on-startup attribute, the servlet must be loaded and initialized when the web application is deployed. The Liberty profile optimizes server start time and memory use by not starting a servlet until a request is received for the web application. We can override this deferral so that your servlets are loaded and initialized when the web application is installed, rather that waiting for the first request for the application.

Example

To configure the server to load servlets when a web application is installed, add the following line to the server.xml configuration file or a file that it includes:

This setting applies to all web applications installed in the server.


Parent topic: Administering web applications on the Liberty profile


|