-1

load-on-startup can specify an (optional) integer value. If the value is 0 or greater, it indicates an order for servlets to be loaded, servlets with higher numbers get loaded after servlets with lower numbers.

I found this statement when I searched about load on startup. I can not clear how it works. Please show me an example for servlets with different load on startup number order.

A.Lokki
  • 1
  • 2
  • 1
    Refer https://stackoverflow.com/questions/809775/what-does-the-servlet-load-on-startup-value-signify – harshavmb May 31 '17 at 02:20
  • 1
    Possible duplicate of [What does the servlet value signify](https://stackoverflow.com/questions/809775/what-does-the-servlet-load-on-startup-value-signify) – Amr Eladawy May 31 '17 at 04:00

1 Answers1

0

well if you had four servlets

servlet1 with value 1 would start first
servlet2 with value 2 would start next
servlet3 with value 3 would start next
servlet4 with value 0 would start manually
Scary Wombat
  • 44,617
  • 6
  • 35
  • 64