File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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: 671
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: 12809
    
    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: 671
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: 61451
    
  67

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: 12809
    
    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: 671
Thanks.
I will look into multiple virtual hosts. Maybe this is what I need.
 
 
subject: Multiple Tomcat Instances on the same box