tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: question on different version of tomcat running on the same pc
Date Tue, 19 Aug 2014 23:06:13 GMT
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 
>> <chris@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.









>>>>> On Sun, Aug 17, 2014 at 4:54 AM, André Warnier
>>>>> <aw@ice-sa.com> wrote:
>>>>>> NEW IT wrote:
>>>>>>> Thanks Sapir for the fast and helpful answer!
>>>>>>>
>>>>>>> On Sat, Aug 16, 2014 at 11:50 PM, Igal Sapir 
>>>>>>> <igal@getrailo.org> wrote:
>>>>>>>> Sure, as long as each instance listens on a unique
>>>>>>>> IP:port combination. On Aug 16, 2014 11:25 PM, "NEW
>>>>>>>> IT" <newitus@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hello experts,
>>>>>>>>>
>>>>>>>>> For development purpose, I wonder if I could install
>>>>>>>>> and run Tomcat 6 and 7 the same time on my same
>>>>>>>>> development box?
>>>>>>>>>
>>>>>>>>>
>>>>>> You probably also want to use 2 different ports here :
>>>>>> <Server port="8005" shutdown="SHUTDOWN"> (see
>>>>>> conf/server.xml)
>>>>>>


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


Mime
View raw message