• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat multiple instances or virtual hosts

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We've setup Tomcat(standalone mode) and now are trying to figure out how we can create multiple instances of an Application from one .WAR file.
The purpose for this is to allow for the internal testers to hit a beta release while our development team can integrate and test another (same app) version.
I'm not quite sure how this would be done under Tomcat.
Same application(one .war file), but many versions. Are Virtual Hosts the answer or Should we just install multiple instances of Tomcat?
I'd like to be able to tell the test team to hit a url..for instance.
http://server-name:8080/appName
and our dev team could hit
http://server-name:1591/appName
just different ports....
Any help is appreciated.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are two approaches.
The first is to house multiple instances of your app from one instance of Tocmat. To do this, simply rename your war file. Tomcat will deploy the new app within 60 seconds.

The second is to run multiple instances of Tomcat. This is also pretty easy.
Just copy your Tomcat installation and change the ports to something unique in your server.xml file. You will need to change port 8080 and the shutdown port. This approach will allow you to access the different instances by changing the port numbers in the browser's address window as you mentioned in your question.

It's even possible to run multiple instaces of Tomcat from one codebase. Google with 'CATALINA_HOME', 'CATALINA_BASE', and the word 'multiple' and you will find plenty of information on this.

There are some other alternatives as well but these two are the simplest.
 
Vasilis Karas
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Appreciate the quick response.
thanks Ben!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic