>-----Original Message-----
>From: Christopher Schultz [mailto:ch...@christopherschultz.net]
>Subject: Re: Multiple Tomcat Instances
>
>Leo,
>
>
>No, you don't have to have one, but if it's there, Tomcat will prefer
>the more-specific library(ies) found in CATALINA_BASE/lib to those found
>in CATALINA_HOME/lib.
>
>> If I place copies(?) of bin, conf, logs, webapps, work and temp in my
>> $CATALINA_BASE directory, then how is that different from just
>> downloading multiple Tomcat zip files and naming them separately,
>> changing the startup/shutdown ports on each?
>
>If you copy everything, then there is no difference. It's more typical
>to only create conf/server.xml and a separate webapps directory for the
>separate instance. The 'work' and 'temp' directories (and "logs"? I
>haven't checked) will automatically be created for you. Run the scripts
>from CATALINA_HOME and they will use CATALINA_BASE to figure everything
>out.
>
>Something not yet mentioned that can be done when using CATALINA_BASE is
>that you can have separate versions of the JVM running the same version
>of Tomcat, if that's useful to you. For instance, in production, we run
>4 separate JVMs - one for each of our primary web applications. Some of
>those applications haven't yet been tested extensively under Java 6,
>yet, so we run them on Java 5 instead.
>
>> The only thing I'm gaining is only needing the two files in my
>> $CATALINA_BASE/bin instead of all the other files? What else? What was
>> the deciding factor to be able to run multiple Tomcat instances?
>
>If you use a minimal set of files in CATALINA_BASE, then upgrading
>multiple (separate) installations of Tomcat is easily done by simply
>installing a new version of Tomcat into a new directory and running the
>new startup script. You can even switch-back to the old version fairly
>easily: run the startup script from the old version instead. ;)
>
>- -chris

This is very helpful everyone.  This kind of stuff needs to be in a newsletter 
or something, the part about using multiple jvms, and typical setups etc.


Tomcat zip dir:
C:\ApacheTomcat\apache-tomcat-6.0.26\bin
In here I created a setenv.bat that has the following: set 
"CATALINA_BASE=%C:\Catalina_Base1%"

C:\Catalina_Base1\
** \conf
** \logs        (automatically added when I ran 
C:\ApacheTomcat\apache-tomcat-6.0.26\bin\startup.bat)
** \webapps
** \work        (automatically added when I ran 
C:\ApacheTomcat\apache-tomcat-6.0.26\bin\startup.bat)

C:\Catalina_Base1\conf
** I copied the contents of \conf from C:\ApacheTomcat\apache-tomcat-6.0.26\conf
** I changed the shutdown port to 8006, HTTP port to 8081, and AJP Port to 8010 
in server.xml

C:\Catalina_Base1\webapps\ROOT  
** I edited the index.html to indicate I'm using the html file from 
Catalina_Base1

http://localhost:8081  
produces the edited index.html file from C:\Catalina_Base1\webapps\ROOT  Very 
cool by the way.

Ok, so how do I get specify multiple CATALINA_BASE options in the setenv.bat in 
C:\ApacheTomcat\apache-tomcat-6.0.26\bin ?

This doesn't work:  set 
"CATALINA_BASE=%C:\Catalina_Base1%;%C:\Catalina_Base2%;%C:\Catalina_Base3%"

Reply via email to