I\'m writing some example code where an embedded Jetty server is started. The server must load exactly one servlet, send all requests to the servlet and listen on localhost:80>
I've written a library, EasyJetty, that makes it MUCH easier to embed Jetty. It is just a thin layer above the Jetty API, really light-weight.
Your example would look like this:
import com.athaydes.easyjetty.EasyJetty;
public class Sample {
public static void main(String[] args) {
new EasyJetty().port(80).servlet("/*", MyApp.class).start();
}
}