This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Load on Startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Load on Startup" Watch "Load on Startup" New topic

Load on Startup

Aleks Pascoal

Joined: Jul 16, 2002
Posts: 12
Hi EveryBody,
the element <load-on-startup> does what? It tells the container to load the class and to instantiate it?
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
From Sun's web.xml DTD:

The load-on-startup element indicates that this servlet should be loaded (instantiated and have its init() called) on the startup of the web application.

It can also take an optional integer indicating the order in which to start it.

I agree. Here's the link:
subject: Load on Startup
Similar Threads
<load-on-startup> Confusion?
What does load-on-startup?
object caching
order of loading in web.xml
Execute jsp code automatically at startup of server