posted 14 years ago
Actually, there are two environment variables. CATALINA_HOME and CATALINA_BASE. For most of us, they'll both have the same value, and they'll point to the Tomcat directory. However, you can have multiple copies of Tomcat running on a machine. In this case, they may all have a common shared codebase, but they may be running different webapps, and they'll certainly be using different ports. So you set CATALINA_HOME to the tomcat directory, then create a separate directory for each Tomcat instance and launch it with a different CATALINA_BASE. The CATALINA_BASE directory contains a distinct copy of the conf, work, webapps, logs and temp directories.
I may have CATALINA_HOME and CATALINA_BASE backwards, so if you plan to use this feature, be sure to look it up in the Tomcat docs. After all these years, I can still never remember which is which. Like I said, it's a very useful feature, but not one that many of us commonly use.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.