• 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

How to run multiple web applications on different port of a single tomcat

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a single instance of apache tomcat server. I want to deploy more than one application on it but each should be run on different port.means each application should be independent to each other.

is there any way for it without creating more tomcat instances??
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In that case you crate multiple services , each service runs on its own port and (if required) its on application base directory. Some thing like this



But be careful, i have seen performance dips in such a scenario, worst if CPU or memery consumption is high you cant nail down on exactly which app is the culprit then.
 
naveen jain
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for your reply.I have found my solution.

But as you said some performance issue is there,so is there any solution for that ?
and also give me suggestion whether i should use more than one service or not?

Thanks again
 
Anadi Misra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Not really, it depends on how well your apps have been written, but yes you can ensure that every thing from the server configuration perspective is ok and hope for the best. For example, make sure JVM is in server mode


keep a high low and maximum memory allocation ( we had to keep the low to 1GB and high to 4GB for our poor tomcat to breathe easily); and hope the the developers have not made lousy mistakes ;)

From time to time fine tuning is requiered for which I did not find any rule of thumb, so I can make a fairly accurate guess that it depends on the apps running in server.
 
naveen jain
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for your suggestion.
i will try to avoid such type of mistake from developers end.

thanks a lot.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic