• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Is it possible, More than one tomcat running in the one system?

 
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to all,

I have one separate server system. I have 5 jsp, java mail web-application.

1. Is it possible to install 5 independent web-application in the single tomcat server? if yes how amount of space required?

2. Or can I install and run 5 tomcat web-server for each 5 application in the one system at the same time? One should not get affected because of the other one.

Please send your suggestions. It will helpful to me.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1. Is it possible to install 5 independent web-application in the single tomcat server?



Sure, people do it all the time. Exactly how depends on how the URLs for the different web apps are constructed - do they all have the same host, etc.? Give us a set of URLs that show how you want to make these apps available.

if yes how amount of space required?



Obviously this depends on the application, but note that all web apps in a single Tomcat instance share all of the basic server code.

Bill
 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my url like

http://localhost:8080/application1/index.jsp
http://localhost:8080/application2/index.jsp
http://localhost:8080/application3/index.jsp
http://localhost:8080/application4/index.jsp
http://localhost:8080/application5/index.jsp

all the application are javamail applications. if anyone application crashes during the running, how the other application behaves?

And Please answer my 2nd question also. Please check my first post above.(multiple tomcat server in the same sysetm is possible?)
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure, you can run multiple instances of Tomcat (they'd need to use different ports, though - you can only have a single instance listen on port 8080). But the URL structure you posted seems to indicate that running 5 web apps on the same server would do just as well.

There are other options, too. You can have a single Tomcat instance that runs 5 servlet containers on different ports. Check the Tomcat docs for details.

But what do you mean by "crash"? Why would a Tomcat instance crash - for internal or external reasons? If the 5 web apps all do the same thing, I'd rather run a single instance and set up monitoring tools that restart the server if it goes down.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not at all clear what your problem is. People run multiple applications addressed as per your example ALL THE TIME. It is just a matter of setting up the directory structure properly.

If you have installed Tomcat you have a working example in front of you. Look at the webapps directory - each one of those subdirectories is a separate web application addressed by a separate URL and manageable separately by the Management application.

See the Servlet API specification for the details but you can probably learn all you need from the docs supplied with Tomcat.

If you design your application correctly, you should be able to recover from practically any error. It really sounds to me as if you are anticipating trouble where there won't be any.

Bill
 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks.

Is it possible to install more than 1 tomcat in a single system with different ports?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. See my earlier post.
 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have installed two tomcats

1. 1st tomcat have installed in c:\program files\Tomcat5.0 with port 8080
2. 2nd tomcat have installed in f:\program files\Tomcat5.0 with port 8081

how can i start and work both tomcat at the same time.
[ July 14, 2008: Message edited by: Edward Durai ]
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
c:/blah blah blah/bin/start.bat
f:/blah blah blah/bin/start.bat
[ July 14, 2008: Message edited by: David O'Meara ]
 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have installed JDK1.5 in my local system,

And 1 tomcat5.0 installed in c drive. during the installation, i have given port 8080
And 1 tomcat5.0 installed in e drive. during the installation, i have given port 8081

during both tomcat installation, i have specified c:\program files\java\jdk1.5 path.

First i have started c: tomcat startup.bat, it is started.

after i tried d: tomcat start.bat, it is not started.

But I got exception like

StandardServer.await: create[8005]: java.net.BindException: Address already in use: JVM_Bind

For Both tomcat's installation, i have given the same JDK1.5 path only. Is there any need to install one more JDK1.5 (each tomcat needs, separate jdk1.5 or not ?)

Please advise
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat uses other ports besides 8080/8443 for internal purposes. E.g., 8005 and 8009. Look through server.xml to find these, and make sure the different instances use different ports, or that those port usages are commented out.

If you change 8005 in particular, then that will affect the shutdown process.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so, please can you tell that " what is the best range of port number we can give?"

[example from 8080 to 9000 is preferable]//this just an example
 
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic