Tomcat tomcat = getTomcatInstance();
// Use the test web application so JSP support is available and the
// default JSP error page can be used.
File appDir = new File("test/webapp");
Context context = tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
// Create a servlet that always throws an exception for a PUT request
Tomcat.addServlet(context, "Bug56568Servlet", new Bug56568aServlet());
context.addServletMapping("/bug56568", "Bug56568Servlet");