Well, it’s been a busy few days. After getting my local copy of tomcat to run webservices deployed by IntelliJ I set about trying to get Tomcat 6 working on the server. It took a lot longer than it should have; there are posts all over the web showing pieces of the configuration process but I wasn’t able to find anywhere with a detailed list of instructions that didn’t assume the user had already done this before. Here’s the process I went through.
- Install Tomcat 6. Basically this involves grabbing the latest tarball from http://tomcat.apache.org/ , unpacking it, and putting the resulting directory wherever you see fit. I installed to /usr/share/tomcat
- Install Metro. This can be obtained from https://metro.dev.java.net/ . It’s only distributed in jar format, so you have to run ‘java -jar metrojarname.jar -console’ to unpack the files. The -console flag is very important if you’re running a headless server; why it’s required for an unpack operation in the first place is beyond me. I placed the resulting directory in /usr/share/metro
- Edit the conf/catalina.properties file in your tomcat installation. The line saying ‘
shared.loader=' should be changed to '
shared.loader=/usr/share/metro/lib/*.jar' ,depending on wherever you installed Metro to.
- Set the CATALINA_HOME environment variable to match your tomcat installation. This can be done with ‘export CATALINA_HOME=/usr/share/tomcat’
- Run the installation script in the metro directory. This can be done by ‘ant -f metro-on-tomcat.xml’
- Done! This seems really easy once you’ve gone through the process, but figuring it out in the first place was complicated.
Tomcat seems to start faster and is more responsive than our previous Glassfish installation. Some of Glassfish’s management tools would have been nice, but all I really care is that TDZK Fleets is up and running again, and the Glassfish bugs that were slowing down development are no longer an issue.