0

I am new to the world of J2ee using Tomcat, so pardon me for my noobness.

At Tomcat start-up, all the war files deployed gets enabled. What do I need to do if I want some of them to be enabled at start up and start the rest of the wars later as per my convenience? There should be something which tells tomcat to enable the wars right[modifying which I might set the start-up settings of an application manual/automatic like that we do for windows services in services.msc]? What I'm looking for is, if there are 3 different apps deployed in tomcat, I should be able to instruct tomcat that at Tomcat start-up, only app1 should start. I will manually turn up app2 and app3 as and when I need it. Like configuring the start up of apps with options like "manual"/"automatic" Thanks in advance.

Aritra B
  • 1,726
  • 6
  • 29
  • 45
  • Take a look [here](http://stackoverflow.com/questions/809775/what-does-the-servlet-load-on-startup-value-of-0-zero-signify). Looks like you just need to change the `web.xml` file to include a `` value. – Brian Feb 15 '14 at 18:15
  • There is the possibility to use the command channel of Tomcat to {un,}deploy webapps on the fly, and configuration options telling whether a webapp should be started at runtime so yes, it is possible – fge Feb 15 '14 at 18:16
  • @Brian: As per my understanding,`` specifies the order in which I want to load the servlets within an app. So, that should be limited within the context of the particular app, but won't control or change the way tomcat loads that app. Please correct me if my understanding is wrong. What I'm looking for is, `if there are 3 different apps deployed in tomcat, I should be able to instruct tomcat that at Tomcat start-up, only app1 should start. I will manually turn up app2 and app3 as and when I need it.` Like configuring the start up of apps with options like "manual"/"automatic" – Aritra B Feb 15 '14 at 18:32
  • @fge: Please elaborate more on your answer. Would really appreciate if you can kindly provide an example with some more details. – Aritra B Feb 15 '14 at 18:36
  • It has been quite some time since I haven't used Tomcat but [this URL](http://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html) can help. Just remind to configure the manager webapp so as to only listen on loopback, though! – fge Feb 15 '14 at 18:40

0 Answers0