How does the load-on-startup element in web.xml affect a servlet's lifecycle?
- It controls the number of instances created for a servlet when handling client requests.
- It decides whether a servlet should be loaded automatically or on demand.
- It determines the order in which servlets are initialized when the application starts.
- It specifies the maximum number of times a servlet can be loaded during the application's lifecycle.
The load-on-startup element in the web.xml file specifies the order in which servlets should be initialized when the application starts. Servlets with lower values are initialized first.
Loading...
Related Quiz
- In a complex web application using MVC and servlets, a new feature requires integration of a third-party service. Where should this integration primarily take place?
- What is the correct way to set a response header to prevent caching of servlet responses?
- To group multiple SQL commands and execute them as a single transaction, use the __________ feature in JDBC.
- How can a filter pass control to the next entity in the filter chain?
- How do you specify the URL patterns to which a filter should apply?