Is it possible, More than one tomcat running in the one system?
Edward Durai
Ranch Hand
Joined: Oct 09, 2004
Posts: 223
posted
0
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.
Thank You<br />Edward
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
1
posted
0
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.
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?)
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
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
Rancher
Joined: Mar 22, 2000
Posts: 12271
1
posted
0
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.
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
Joined: Oct 09, 2004
Posts: 223
posted
0
thanks.
Is it possible to install more than 1 tomcat in a single system with different ports?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
Yes. See my earlier post.
Edward Durai
Ranch Hand
Joined: Oct 09, 2004
Posts: 223
posted
0
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 ]
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
Joined: Oct 09, 2004
Posts: 223
posted
0
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
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
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.