Reusable code to operate Apache Tomcat server