-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

André,

On 8/19/14, 7:06 PM, André Warnier wrote:
> Christopher Schultz wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
>> 
>> Shawn,
>> 
>> On 8/19/14, 2:31 PM, NEW IT wrote:
>>> So you meant after I fired up the Tomcat 7 then change the 
>>> environment variables for the version 6 and startup there too?
>> 
>> Yes, you can do that, but...
>> 
>>> CATALINA_HOME could set to version 7 and CATALINA_BASE set to 
>>> version 6 OK?
>> 
>> No, CATALINA_BASE has to agree with CATALINA_HOME's
>> configuration. So you can't for example create a setup under
>> /opt/tomcats/mywebapp/ and then launch with
>> CATALINA_BASE=/opt/tomcats/mywebapp/ under both Tomcat 6 and
>> Tomcat 7. The reason is that server.xml usually contains certain
>> things that are version-specific.
>> 
>> But, if you want to deply the same web application to Tomcat 6
>> and Tomcat 7, you could do something like this:
>> 
>> $ JAVA_HOME=/opt/java-7 $
>> CATALINA_HOME=/opt/apache-tomcat-7.0.55 $
>> CATALINA_BASE=/opt/tomcats/mywebapp-tc7/ $
>> CATALINA_HOME/startup.sh
>> 
>> $ JAVA_HOME=/opt/java-6 $
>> CATALINA_HOME=/opt/apache-tomcat-6.0.41 $
>> CATALINA_BASE=/opt/tomcats/mywebapp-tc6/ $
>> CATALINA_HOME/startup.sh
>> 
>> This will launch Tomcat 6 on Java 6 with your webapp configured
>> in mywebapp-tc6 and a similar setup with later versions for
>> mywebapp-tc7.
>> 
>> - -chris
>> 
>>> On Tue, Aug 19, 2014 at 10:43 AM, Christopher Schultz 
>>> <ch...@christopherschultz.net> wrote: To whom it may concern,
>>> 
>>> On 8/19/14, 1:32 PM, NEW IT wrote:
>>>>>> Besides setting for the 2 different ports, how do deal
>>>>>> with the Environment Variables of Path, CATALINA_HOME?
>>>>>> They are having the values for the 7 for now and
>>>>>> JAVA_HOME could be using the the same one for Tomcat 7
>>>>>> and 6?
>>> You can do anything you want, here.
>>> 
>>> CATALINA_HOME specifies where the Tomcat installation is. 
>>> CATALINA_BASE specifies where your "local" deployment goes:
>>> this allows you to use a single CATALINA_HOME with multiple
>>> Tomcat instances running with separate configurations (those
>>> with different CATALINA_BASEs). JAVA_HOME specifies the JVM to
>>> use.
>>> 
>>> You can set the above environment variables, launch Tomcat,
>>> then set them to other values and launch another instance of
>>> Tomcat. You can change your JVM, Tomcat version, etc. whenever
>>> you want. Once the JVM is launched, that process is independent
>>> of the shell you used to launch it.
>>> 
>>> On our development servers, we have multiple developers with 
>>> multiple per-webapp JVMs running all off the same
>>> CATALINA_HOME under different JVMs. All you have to worry about
>>> is the port settings in each CATALINA_BASE/conf/server.xml.
>>> 
>>> Hope that helps, -chris
>>> 
> 
> The subject says "on the same pc". Now that is not a guarantee that
> we are talking about Windows here, but at least a strong
> suspicion. In such a case, there is the question of whether this
> relates to running Tomcat as a Windows Service, or in a command
> window, or both. So this may all be a bit more complicated than
> meets the eye.

While that may be true, that's an implementation detail (e.g. Windows
Service versus Debian Linux package-maintained service, etc.). The
point is that Tomcat can in fat be run side-by-side on the same
machine: the mechanisms exist to do so... you may have to work a bit
to get it working with your deployment strategy.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJT9O4rAAoJEBzwKT+lPKRYQCoP/2EEY+3RQSXQRGtq0qkFoeFB
w6ocM1gtOMimIYku7xcVGfim5ZEfooRo8Y06tCPpzIsGA0d75tPhbY/ckbEhswBu
SGpbzztN89hdfXud35e6meLm9Y7gsLS92+nKOh8s0Spvqm82AIc36eoQNNUk8+Ax
7O6RDmClUusx0cTeweilrTEReM9Ow48QiqBvy7uXThRAJbm24pKkd/aBEKeeRplh
y/KiMUX9A+nwX0MEbKkyYmdC1kIiaYJrUj27gyLBtP/41XCiSdyAAgWWrgkFD+tq
3POxTE1604gp3C7fwlLD6M2SqRNr6zHo8jyZpzIVYnKQWnCZlfnLzwOcC+LOgImC
3VddjKdNZStbTEAIs3Wjql3WePl/NZWIXpsZ4A231+/fsV0hm/cYgJ7iB3vVLUrx
GKaBaNJx16XvL1HSK3AE/4DE9P7DdBzPv/hvgcvIPy0mkNtO25I/v94eigtgUCrq
HRDVKG1KYWhusaK11t4A+wFhqb6qhLfAjwUtYwHuNPb35hoiBlKcZxIkq1DVBcqg
QiFjo0g1MDUehjKSmVB2awFnTu1t3zQS4vWAMYC/bmfCXnzyh8wiHE0M+91TOde2
EQ8uOcqcszyd4LG675dVLQx0Zrqr+Mz+4qE6yeBWsJvqFNWFFCkNkXnfrBpg3w/O
IQTD/JlyUaCDngS1+x79
=cRSN
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to