// You can customize the context by calling
// its API
- tomcat.addServlet(ctx, "myServlet",
- new HelloWorld());
+ Tomcat.addServlet(ctx, "myServlet", new HelloWorld());
ctx.addServletMapping("/", "myServlet");
tomcat.start();
File appDir =
new File(base + "output/build/webapps/examples");
// app dir is relative to server home
- StandardContext ctx =
- tomcat.addWebapp(null, "/examples",
- appDir.getAbsolutePath());
+ tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
tomcat.start();