• <Load-on-startup>
    • In order to equalizer response time of first request coming to action servlet where the response time of other than first request coming to action servlet we need to make servlet container creating action servlet before first request either during server startup during web application development for this we need to enable <load-on-startup> on action servlet as shown in the above code
    • when multiple servlet of web app are enable with load on startup these servlet object will created during servlet server startup or at the time deployment will be decide on load on start up priority value given for <l-o-s>
      • high value=low priority
      • low value=high priority
      • zero value= least priority
      • -ve value= ignores load on startup on servlet
    • Multiple servlet of web app can have <l-o-s> values
    • If is not mandatory that all servlet of web app must be enable with <l-o-s>
    • Enabling <load-on-startup> on servlet with –ve value as priority value is equal to not enabling <load-on-startup> on servlet

Web app
Servlet
<l-o-s>
I
prefer
II
prefer
Servlets web app
1
3
B
-1
Ignore

2
1
A
0
C

Classic web app
3
8
C
4
A

15
20
D
3
B


    • Since action servlet is only the servlet of struts based web app we can use any +ve number or zero as <l-o-s> priority of action servlet