Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

load on startup

 
Thomas Greene
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have set the load-on-startup element in my web.xml to 1 but still the init() method is called only when the client makes the first request.
Here is my servlet




and here is my web.xml file



I was expecting to see "HELLO" printed on restarting the server. But it doesn't come up until a request is made.
Am I interpreting it incorrectly?
 
Nitish Bahadur
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put your <load-on-startup> inside the <servlet> you want to load.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic