Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Multiple webapps in the same container ?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Is it necessary to deploy each webapp in a different tomcat instance.
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.
 
Ranch Hand
Posts: 123
Firefox Browser Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mikael Howell
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I have deployed webapps in the similar fashion.
However, restarting tomcat leaves me with this



Here is the process output
[root@centos logs]# ps aux | grep java
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 ?
 
Saloon Keeper
Posts: 22289
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
rubbery bacon. rubbery tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic