GeeCON Prague 2014*
The moose likes Tomcat and the fly likes Multiple Tomcat Instances on the same box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Multiple Tomcat Instances on the same box" Watch "Multiple Tomcat Instances on the same box" New topic
Author

Multiple Tomcat Instances on the same box

Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 666
How to configure multiple tomcat instances using a single Tomcat code base?
I could not find any document about this.
Thanks.


BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design

Crazy Bikes created by m-Power
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
The main thing is you have to configure server.xml so that the different instances use unique ports.
Bill
Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 666
Thanks.
I know how to configure server.xml if I use multiple Tomcat instalations.
I don't how to configure multiple instances based on ONE Tomcat install.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61314
    
  66

Do you really need multiple Tomcat instances, or are multiple virtual hosts what you really need?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
Does that mean you want one JVM to run two instances of Tomcat? Why?
If what you really want is to host two separate and distinct web sites in the same instance, I believe that can be done by configuring server.xml. It is called "virtual hosting" - a google search for "tomcat virtual host" turned up a bunch of references.
Bill
Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 666
Thanks.
I will look into multiple virtual hosts. Maybe this is what I need.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Multiple Tomcat Instances on the same box