The latest version of cPanel supports tomcat installation, you can install Tomcat by following the below steps
1. Login to WHM
2. Navigate to Home >> Software >> EasyApache 4 and select “Customize”
3. On the next screen select “Additional Packages” and Select “tomcat85” as described in the below screenshot.
4. Now select “Review” and click on “Provision”.
5. Now the tomcat is successfully installed on the server, you can confirm the same by navigating to
WHM Home >> Software >> Tomcat Manager
You can find the official documentation from cPanel in the below URL