tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <>
Subject Re: possible to define/deploy a context but not start it?
Date Tue, 01 Jun 2010 16:45:24 GMT
On 01/06/2010 17:36, Jeff Ramin wrote:
> On 05/29/2010 08:30 AM, Konstantin Kolinko wrote:
>> 2010/5/29 Pid<>:
>>> On 28/05/2010 19:07, Jeff Ramin wrote:
>>>> Running tomcat 5.5.20.
>>>> Is there a way to configure tomcat such that it is aware of a webapp
>>>> (context),
>>>> but doesn't start it (process requests) when tomcat starts?
>>> Kinda.  Examine the docs, look at the Host and Context attributes, for
>>> 'deployOnStartup', 'autoDeploy' and 'reloadable'.  Depending on what you
>>> need it might be all-or-nothing situation though.
>> It is possible to turn off auto-deploy (autoDeploy, deployOnStartup),
>> i.e. the webapplication will be present in webapps folder, but it will
>> not be running, nor will it be listed by Tomcat Manager.
>> Deploying a webapplication, though, always starts it.
>> If a webapplication is included as a<Context>  element in server.xml
>> (usually not recommended), it is always deployed and started when
>> server starts, regardless of deployOnStartup option.
>> Besides the documentation, you may also want to look at the archives
>> of this list.  deployOnStartup/autoDeploy were discussed several
>> times.
> Thanks. I just read the thread from a couple weeks ago regarding autoDeploy
> and deployOnStartup. I'm still not quite sure I can make tomcat do what
> I want it
> to, so let me be explicit...
> I want to start an application via JMX. Thus, tomcat needs to be
> running, so that
> the JMX agent is available. But, I don't want my web application to be
> available
> until it gets explicitly started as the result of a JMX invocation of a
> WebModule bean.
> Does that make sense? Is this possible? I haven't been able to make it
> work on my
> dev machine thus far.

If you start with deployOnStartup, autoDeploy, reloadable all configured
to false in the app's Host and Context you should be able to start
Tomcat without any app deployment taking place.

Are you able to make this work with a very simple app in a .war file
(e.g. one that just contains a single servlet that logs a message on

N.B. Once it's deployed, you'll have to undeploy it before beginning the
test cycle again.


View raw message