How to insert tomcat in java

I am trying to insert tomcat in a java application. I searched google but no luck. I could not find a good textbook. are there any complete manuals or api docs for embedding tomcat. this question may be duplicated by another question . but it seems old. I read that tomcat 7 api has improved a lot over tomcat 6. so I thought it was old. Any links for tutorials are welcome.

+6
source share
1 answer

there is a more recent tomcat 8 embedding tutorial here .

its essence:

public static void main(String[] args) throws Exception { Tomcat tomcat = new Tomcat(); tomcat.setPort(8080); //actually deploy stuff on your tomcat by defining contexts tomcat.start(); tomcat.getServer().await(); } 
+12
source

Source: https://habr.com/ru/post/972714/


All Articles