Prerequisites





Install Java


And set JAVA_HOME variable accordingly in ~/.bashrc:



export JAVA_HOME=/opt/jdk1.8.0_451









Install Tomcat


And set CATALINA_HOME accordingly in ~/.bashrc:



export CATALINA_HOME: /opt/apache-tomcat-9.0.109









Create two instances of our Tomcat


(Kudos to Goran Vasic)

They will...