>________________________________ > From: "chad.da...@emc.com" <chad.da...@emc.com> >To: users@tomcat.apache.org >Sent: Wednesday, May 30, 2012 9:40 AM >Subject: using CATALINA_BASE > >I'm following the directions found in the RUNNING.txt file of the >distribution, version 5.5.35. > >It says: > >"you can pass a '-Dcatalina.base=$CATALINA_BASE' argument when >executing the startup command" > >This doesn't work for me. I think I kind of know why but a couple of points >of clarification would be useful. > >1) This parameters is a pass through to the JVM correct? In other words, it >means nothing in the startup.sh and catalina.sh scripts. > >2) If the answer to number 1 is true, it seems that catalina.sh's execution >of my $CATALINA_BASE/bin/setenv.sh will never get executed . . . > > >Any ideas? > >Thanks! >Chad
First of all, I'm going to assume that you're running a 5.5 version of Tomcat, since the line you quote is only present in RUNNING.txt from those versions. At least it's not present in the latest 6.0 or 7.0 version. Now looking at this line closely: '-Dcatalina.base=$CATALINA_BASE' This means that you already have a CATALINA_BASE environment variable set somewhere. Otherwise $CATALINA_BASE is going to be empty (and will be set to $CATALINA_HOME). The second issue is the single quotes. I think that this is probably not right, in that single quotes (in a bash shell world - again an assumption) prevent variables from being interpolated. When I launch multiple Tomcats, I use a shell script similar to the following: #!/bin/bash CATALINA_HOME=/some/path/to/my/home/tomcat # the below is all on one line - sorry for the line wrap ( export CATALINA_BASE=/some/path/to/first/catalina_base; $CATALINA_HOME/bin/startup.sh ) # my Tomcat instances are usually pretty bare sleep 5 # the below is all on one line - sorry for the line wrap ( export CATALINA_BASE=/some/path/to/second/catalina_base; $CATALINA_HOME/bin/startup.sh ) # etc., etc., etc. This is how I launch multiple Tomcats to run a small cluster on my development machine. As far as I can tell, it works as it should. . . . . just my two cents. /mde/ --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org