File appDir = new File(getBuildDirectory(), "webapps" + contextPath);
// app dir is relative to server home
org.apache.catalina.Context ctx =
tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
ctx.addApplicationListener(new ApplicationListener(
WsContextListener.class.getName(), false));
// Override the default servlet with our own mappings
Tomcat.addServlet(ctx, "default2", new DefaultServlet());
ctx.addServletMapping("/", "default2");