Leo Donahue - PLANDEVX wrote:
I'd like to run two different versions of Tomcat on the same server if poss= 
ible.

I have Tomcat 5.0.28 running as a windows service from a non-zipped version= 
download. I'd like to be able to run Tomcat 6.0 on the same server.

I'm not trying to setup a test and development environment, I actually have= to 
support an webapp that requires Tomcat 5.0.28 but I would also like to = run a 
webapp that supports JSF 1.2

Some of the articles I've read offer different approaches to doing this. S= ome 
articles talk about editing the service.bat file, some articles talk ab= out 
just changing the start and shutdown ports between the two versions.

Can someone point me in the right direction to accomplish this?

Allright, I'll bite. And probably forget something along the way. But you ask just to be pointed, right ?

1) you cannot run two http servers listening on the same port(s), on the same host. So, no matter what you do, you are going to have to change the ports on which your second Tomcat will listen.
That means that the users of one Tomcat will access it like
http://yourserver:8080
and the users of the other Tomcat, like
http://yourserver:8081

If you really don't like that, it is also possible to avoid it, but it is more complicated and we'll leave that for a second phase.

To find out which ports the first Tomcat is listening on, look at the file "server.xml" which should be in the "conf" subdirectory of your first Tomcat. In that file, you will find at least two uncommented <Connector> sections, each having a "port=" attribute.
Note these port numbers.

If this Tomcat is currently running, open a command window and enter
netstat -an | more
and look for lines ending in "LISTEN". Each such line indicates that there is some program listening on a port, and two of them should match your <Connector>'s ports above (look in the second column, for something like
127.0.0.1:8080
where the last part is the port number.

Yes ? then we're doing well.
Those are the ports to avoid with your second Tomcat.

2) you can also not run two Windows services with exactly the same name.
So you might have to change the service's name for the second Tomcat.

Other than that, there should not be big difficulties.

Download and install your second Tomcat in a different directory from the first one. If you are using the non-zipped version, I guess this means the installer, and that means I have to do some guesswork from memory. The second Tomcat will probably install properly, but it will not start, because of the ports conflict. If so, find the server.xml of the second Tomcat, and change the ports in the <Connector> elements, to be different from the first Tomcat.
For example
8005 --> 8006
8080 --> 8081

Then try to start this Tomcat, and let us know what happens.



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

Reply via email to