Generally, we downloaded the TOMCAT to the computer and configure the context where it stores the project path then run the TOMCAT. So we can access our web project. Is there a possibility that we can start the TOMCAT by just using java code. like
Tomcat tomcat = new Tomcat(configuration);
tomcat.run();