You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matthew Marleau <mm...@halogensoftware.com> on 2012/02/10 19:26:25 UTC

Configuring Tomcat 6 to only start the default "manager" webapp

Hi,

I was wondering if anyone knew how to configure Tomcat (6.0.26) to only start the default app when the Tomcat service starts. I have many webapps deployed so that they are accessible when I need them and I don't have to re-deploy/configure them later, but I don't like that they all start up when the service starts. I've tried searching around for this, but haven't had any luck so far.

I found one entry in the mail list archives, but it was talking about disabling the auto deploy which I don't think will help me here.

Thanks in advance,

Matt Marleau

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Configuring Tomcat 6 to only start the default "manager" webapp

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthew,

On 2/10/12 1:26 PM, Matthew Marleau wrote:
> I was wondering if anyone knew how to configure Tomcat (6.0.26) to 
> only start the default app when the Tomcat service starts.

The manager webapp isn't the "default" webapp. If you mean the ROOT
webapp, then that's the "welcome" webapp. The manager is traditionally
deployed into "/manager".

> I have many webapps deployed so that they are accessible when I
> need them and I don't have to re-deploy/configure them later, but I
> don't like that they all start up when the service starts.

I'm curious: why? Do they take a long time to start up? Do they
interfere and/or take resources away from the other webapps that you
*do* want to use immediately?

If the former, note that Tomcat now supports parallel deployment at
startup, which might help you. If the latter (or even the former),
might I suggest that you change your webapp's behavior so that it does
lazy resource loading so that launching the webapp itself is fairly
trivial but additional things (caches, etc.) are only filled when they
are accessed.

> I've tried searching around for this, but haven't had any luck so 
> far.
> 
> I found one entry in the mail list archives, but it was talking
> about disabling the auto deploy which I don't think will help me
> here.

In fact, that's almost certainly something you want, especially in a
production environment: it slightly reduces the amount of overhead
that occurs at the Tomcat level because TC doesn't have to keep
looking at the appBase directory looking for anything that has changed.

I think what you probably want to do is something like this:

1. Move all your webapps out of CATALINA_BASE/webapps
2. Deploy only the manager webapp
3. Do all your deployments from the manager webapp
4. Whenever you stop Tomcat, delete everything in
CATALINA_BASE/conf/Catalina/[hostname]/*.xml except for manager.xml

That ought to do it. It wouldn't hurt during #4 to clean-out the
"work" directory as well, just in case.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk85TRAACgkQ9CaO5/Lv0PAvmgCfVLJVdcgtw6LPOI0dDR4d4IjS
ooMAniUxu5GrQoeHCNE+R5CMsomDopVm
=WUwl
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org