Title / Description
Code Tomcat tomcat = new Tomcat(); tomcat.setPort(port); File base = new File("..."); Context ctx = tomcat.addContext("/",base.getAbsolutePath()); StandardContext standardContext = (StandardContext)ctx; standardContext.addApplicationListener(CdiServletContextListener.class.getName()); Wrapper wrapper = Tomcat.addServlet(ctx,"YourServlet",YourServlet.class.getName()); wrapper.addMapping("/*"); tomcat.start();
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code