A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Multiple webapps in the same container ?
Joined: Dec 29, 2012
Dec 29, 2012 04:27:28
Is it necessary to deploy each webapp in a different
If NO, how do I deploy all the webapps to the same instance. I face errors related to Perm, memory, scoket,etc.
If Yes, Then how do have multiple instances of Tomcat. I've been struggling to get through this.
Thanks in advance.
Joined: Aug 06, 2012
Dec 29, 2012 04:45:17
Yes, you can install multiple web applications (e.g. multiple war files) in 1 tomcat instance.
They must have different context root.
E.g. you can have localhost:8080/myapp1/index.jsp, and localhost:8080/myapp2/index.jsp
where myapp1 and myapp2 are the context roots.
Joined: Dec 29, 2012
Dec 29, 2012 05:00:29
Well I have deployed webapps in the similar fashion.
However, restarting tomcat leaves me with this
Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
Here is the process output
[root@centos logs]# ps aux | grep
user1 9458 3.2 17.7 630864 186056 ? Sl 22:44 0:24 /usr/java/latest/bin/java -Djava.util.logging.config.file=/usr/share/apache-tomcat/conf/logging.properties -Xms128m -Xmx256m -XX:MaxPermSize=256m -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/share/apache-tomcat/endorsed -classpath /usr/share/apache-tomcat/bin/bootstrap.jar:/usr/share/apache-tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/share/apache-tomcat -Dcatalina.home=/usr/share/apache-tomcat -Djava.io.tmpdir=/usr/share/apache-tomcat/temp org.apache.catalina.startup.Bootstrap start
root 11147 0.0 0.0 3112 740 pts/3 S+ 22:56 0:00 grep java
What am I missing ?
Joined: Jun 25, 2001
Dec 31, 2012 05:41:26
Your memory parameters are on the small side. About half of what you allow is going to be used up by Tomcat itself before any webapps even get deployed. Try bumping up mx to 512M or at least 384M.
Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: Multiple webapps in the same container ?
Can Tomcat serve apps on two different IP addesses, both on port 80
How to running multiple Tomcat on one Server.
Liferay multi tenancy and multi tenancy deployments
How to setup two tomcats in eclipse indigo ?
Is there a Java App server support O&M across the cluster
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014