The value of the tag load-on-startup helps the container determine when the servlet has to be loaded.
A value >=0 means that the servlet has to be loaded when the application is deployed.
If the value is less than zero or if the tag element is not present, the servlet will be loaded when it is first called.
Also, the order in which servlets are loaded is determined by the value of load-on-startup. The servlet which has a lower load-on-startup value will be loaded first. e.g the servlet with value 2 will be loaded before the servlet with this value as 4.
Apart from this, if two servlets have same value of load-on-startup, then they are loaded in the order in which they are defined in the Deployment descriptor file.
No comments:
Post a Comment