I know this is an older post, but I've come across this issue, as I have multiple instances of Tomcat on my dev machine, and tend to have them in subdirectories of my user account, to keep them separate from what comes stock with OS X.
I've found it's better to have these sorts of settings self-contained, that is, in a setenv.sh
file, for each instance.
SO, for example, if John Doe is running Tomcat v7.0.49, from within some directory he's created:
/Users/johndoe/Server/app/tomcat-7.0.49/bin/setenv.sh
And in that file:
export CATALINA_BASE="/Users/johndoe/Server/app/tomcat-7.0.49"
export CATALINA_HOME="/Users/johndoe/Server/app/tomcat-7.0.49"
This will work, pretty much from anywhere. You're now telling this particular Tomcat instance where to look for itself. Keep in mind, if you have multiple instances of the same Tomcat version in the same directory, you'll need to give each a unique parent folder name.
Also worthy of mention, CATALINA_BASE is optional, and will default to CATALINA_HOME, if you leave it out. Listing both is simply my personal preference.
${HOME}
in place of/Users/user
?