Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

state of servlet object when server starts

 
sitaram irrinki
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the state of the servlet obj when web server is started
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It may or may not exist.

If you specify load-on-startup in the servlet declaration in web.xml, you can force it to load when the context loads. Otherwise, it may not be loaded until the first time someone tries to access it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic