title: How to make embedded servlet engine instantiate servlets eagerly?
body: <p>The problem is simple, but I'm struggling a bit already.</p>
  
  <pre><code>Server server = new Server(8080);  
  Context context = new Context(server, "/", Context.NO_SESSIONS);
  context.addServlet(MainPageView.class, "/");
  context.addServlet(UserView.class, "/signup");
  server.start();
  </code></pre>
  
  <p>That's a pretty standard piece of code that you can find anywhere in Jetty world. I have an application that embeds Jetty as a servlet engine and has some servlets. </p>
  
  <p>Instantiation of some of these servlets requires heavy work on startup. Say &ndash; reading additional config files, connecting to the database, etc. How can I make the servlet engine instantiate all servlets eagerly, so that I can do all the hard work upfront and not on the first user request?</p>