Tomcat 7 emdedded
How to embedded tomcat 7 java
Copy this code and paste it in your HTML
String webappDirLocation
= "src/main/webapp/"; Tomcat tomcat = new Tomcat();
tomcat.setPort(8080);
tomcat.
addWebapp("/jerseyTest",
new File(webappDirLocation
).
getAbsolutePath());
tomcat.start();
tomcat.getServer().await();
Report this snippet
Comments
Subscribe to comments