Shaun Abram
Technology and Leadership Blog
Setting up multiple instances of Tomcat
With multiple tomcat instances, each can run in its own JVM, have its own configuration and can be started/stopped independently.
One approach to doing this would be to have multiple, full tomcat installations. This article instead details how to install tomcat once (in CATALINA_HOME) but have multiple independent instances (by utilizing CATALINA_BASE). This is a more streamlined approach that makes creating multiple instances easier and also simplifies upgrades/rollbacks of tomcat.
Tags: apache, appserver, tomcat
Ant build file to redeploy to Tomcat
Here is an example of an ant file that redeploys a web project to tomat. The neat thing is that as well as creating the war file, it also stops and restarts tomcat, all from ant.
I have found myself rewriting variations of this on a couple of projects recently, so I thought it was worth posting…
(Note it doesn’t include a compile target as I am doing it from my IDE)
And here is an example of the associated build.properties file
tomcat.home=C:/Program Files/Apache/tomcat
project.name=SampleProjectName
project.warfilename={project.name}.war
project.deploywar=${tomcat.home}/webapps/${project.name}.war
project.deploydir=${tomcat.home}/webapps/${project.name}