This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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.
Author and all-around good cowpoke
Joined: Mar 22, 2000
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.
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 ?)
Joined: Mar 22, 2005
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.