• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

avoid loading all applications under webapps

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

I have a couple of applications under webapps folder and by default all applications are loaded/started when I start my tomcat. I would like to know how to load/start only applications that I want at any given time. Is there some configuration to be done to achieve this.

example:
/webapps/app1
/webapps/app2
/webapps/app3

I want to load any one or more app(x) at any given time.

Thanks in advance.
Kriss.
 
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
The Tomcat Web Application Manager lets you stop selected applications. I think that prevents them from loading when Tomcat is restarted, but have not tried it myself.
Bill
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could set the autoDeploy attribute to false in your server.xml's Host section and then explicitly configure the apps that you want to run via context entries in server.xml (or the newer context fragment files in tomcat/conf/Catalina/localhost).

Stopping them from the manager app won't keep them from starting when Tomcat restarts.
Undeploy will keep them from starting but it does this by deleting the entire directory which is probably not what you would want.
 
Kriss Reddy
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Many thanks for your replies.

Ben, is there any documentation about what you mentioned in your reply.

Thanks,
Kriss.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
 
Kriss Reddy
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the links. Is this possible for 5.0.28 as well?
Kriss.
 
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
A crude but effective way of preventing Tomcat from loading an application would be to change the name of web.xml - without a web.xml on startup, Tomcat ignores the directory.
Bill
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello experts,

I have similar problem but somewhat different I wanted my application not to deploy if it do not find some system property defined.
I am using WAS (Websphere Application Server). Though I am throwing SystemPropertyNotFoundException (which extends InternalError) from context initialized method of listener, it is getting catched by deployment manager (the Error should not be catched) attached screenshot for details. Please help me out n what could be wrong
ExceptionCaught.JPG
[Thumbnail for ExceptionCaught.JPG]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am using tomcat 6. I have updated server.xml file as below, but still all my applications are loading at each startup:

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="false"
xmlValidation="false" xmlNamespaceAware="false">

<Context path="/acbd" docBase="abcd" debug="0" reloadable="true"/>


<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>


</Host>


Am I missing anything?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic