A: 

Use the Context.addServlet overload that takes a ServletHolder. ServletHolder is a class that accepts either a Class or a Servlet instance.

Servlet myServlet = new MyServlet();
ServletHolder holder = new ServletHolder(myServlet);
context.addServlet(holder, "/");

This assumes Jetty 6. I think it will work for Jetty 7 as well.

Justin Rudd
Justin, that'd do the trick. But for a few reasons (i.e. hidden Guice-based dependency injection) I need Jetty to eagerly instantiate the servlets for me.
Marcin
+1  A: 

I'm not sure why using Guice make's Justin's option not work for you. What exactly is getting injected in? I'm not sure if this would help you at all because it is very similar to what Justin wrote above but if you do it this way, Jetty will do the actually instantiating.

Context context = new Context(server, "/", Context.NO_SESSIONS);
ServletHolder mainPageViewHolder = new ServletHolder(MainPageView.class);
// Do this to force Jetty to instantiate the servlet
mainPageViewHolder.getServlet();  
context.addServlet(mainPageViewHolder, "/");
delux247
Private fields of the servlet are injected. This answer is better, but I still kinda hoped for some unknown missing flag that I can set and jety will instantiate everything eagerly. Anyway, I think I'll have to live with that.
Marcin