teste
Java
code posted
by
Benevides
created at 06 Jan 17:16
Edit
|
Back
1 2 3 4 5 6 7 8 9 |
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(); |
414 Bytes in 2 ms with coderay