public static void main(String[] args)
throws Exception
{
Server server = new Server(8080);
ContextHandlerCollection contexts = new ContextHandlerCollection();
server.setHandler(contexts);
Context root = new Context(contexts,"/",Context.SESSIONS);
root.addServlet(new ServletHolder(new HelloServlet("Ciao")), "/*");
Context other = new Context(contexts,"/other",Context.SESSIONS);
other.addServlet("org.mortbay.jetty.example.ManyServletContexts$HelloServlet", "/*");
StatisticsHandler stats = new StatisticsHandler();
contexts.addHandler(stats);
Context yetanother =new Context(stats,"/yo",Context.SESSIONS);
yetanother.addServlet(new ServletHolder(new HelloServlet("YO!")), "/*");
server.start();
server.join();
}