Server server = new Server(0);
HandlerList handlers = new HandlerList();
WebAppContext contextA = new WebAppContext(".", "/A");
contextA.addServlet( ServletA.class, "/s");
handlers.addHandler(contextA);
WebAppContext contextB = new WebAppContext(".", "/B");
contextB.addServlet(ServletB.class, "/s");
contextB.setContextWhiteList(new String [] { "/doesnotexist", "/B/s" } );
handlers.addHandler(contextB);