You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Roger Tismeer <rt...@Initiatesystems.com> on 2007/05/23 19:20:53 UTC

How-to make default Running status = false

Hi there,

 

I've been perusing the wiki and other avenues for some help in regards
to being able to not Start any of the webapps that I have loaded when I
start up Tomcat.  Is this possible?

 

The only thing I have found recommended is to remove webapps you don't
need .... This does not help me.

 

It takes about 4 minutes or so to (re)start Tomcat .... granted I have
30 webapps loaded, but isn't there a switch somewhere that I can toggle
to not auto-start any non-Tomcat webapps?  This way I can simply Start
the few apps I need via the Manager and as I need more or less, I can do
so.

 

 

Thanks,

Roger Tismeer

(480) 570-4987

 


RE: How-to make default Running status = false

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Roger Tismeer [mailto:rtismeer@Initiatesystems.com] 
> Subject: RE: How-to make default Running status = false
> 
> Tweaking server.xml | host section | variable autoDeploy = false does
> not do anything .... all 30 webapps are still Running = true when
> restarting Tomcat

O.k., now how about trying what Mark W actually suggested, which was
setting deployOnStartup (not autoDeploy) to false.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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


RE: How-to make default Running status = false

Posted by Roger Tismeer <rt...@Initiatesystems.com>.
Tweaking server.xml | host section | variable autoDeploy = false does
not do anything .... all 30 webapps are still Running = true when
restarting Tomcat

Now if I actually tweak unpackWARs = false, then 7 of my webapps are
Running = false .... which is good, but then when I try to start them
then nothing happens, they just remain as is i.e., false

-----Original Message-----
From: Mark H. Wood,UL 0115A,+1 317 274 0749,
[mailto:mwood@mhw.ulib.iupui.edu] On Behalf Of Mark H. Wood
Sent: Wednesday, May 23, 2007 11:22
To: Tomcat Users List
Subject: Re: How-to make default Running status = false

On Wed, May 23, 2007 at 12:20:53PM -0500, Roger Tismeer wrote:
> I've been perusing the wiki and other avenues for some help in regards
> to being able to not Start any of the webapps that I have loaded when
I
> start up Tomcat.  Is this possible?

In server.xml the 'host' element's 'deployOnStartup' attribute looks
like it would do this, if set to 'false'.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Typically when a software vendor says that a product is "intuitive" he
means the exact opposite.


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


Re: How-to make default Running status = false

Posted by "Mark H. Wood" <mw...@IUPUI.Edu>.
On Wed, May 23, 2007 at 12:20:53PM -0500, Roger Tismeer wrote:
> I've been perusing the wiki and other avenues for some help in regards
> to being able to not Start any of the webapps that I have loaded when I
> start up Tomcat.  Is this possible?

In server.xml the 'host' element's 'deployOnStartup' attribute looks
like it would do this, if set to 'false'.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Typically when a software vendor says that a product is "intuitive" he
means the exact opposite.


Re: How-to make default Running status = false

Posted by Rashmi Rubdi <ra...@gmail.com>.
On 5/25/07, Mark H. Wood <mw...@iupui.edu> wrote:
> > Say your apps are named app1, app2, app3 etc and if you access them as
> >
> > http://localhost:8080/app1  http://localhost:8080/app2
> > http://localhost:8080/app3 , then
> >
> > you would define the Context for each app under
> >
> > Tomcat's /conf/Catalina/localhost/  as app1.xml , app2.xml and app3.xml
> >
> > Now if you want Tomcat to only load app1 , you just disable the other
> > XML files by renaming them as in app2.xml_disable app3.xml_something
>
> In that case, you have to either ensure that your webapp.s do not
> contain META-INF/context.xml or that the Host has deployXML='false'.
> Otherwise the webapp itself will supply a Context.
>
> Tomcat will generate a Context on its own in some circumstances which
> I've not yet completely worked out from the documentation.  How did
> you disable this?

In the development environment settings, I don't usually add a
context.xml file under META-INF.

I normally create a <ContextName>.xml file under each <Host Name> folder.

So with the above setting, I can visibly see in Tomcat's start-up
console that it has loaded only those webapps that have a .xml file,
and doesn't load those that don't.

I also keep my projects ~outside~ Tomcat's webapps folder and I only
specify the project's root folder in the docBase attribute of Context.
The appBase attribute is something like webapps/ContextName , and path
is empty. This way, upgrading Tomcat becomes easier and simpler.

I haven't really experienced Tomcat generating a Context (either in
server.xml or a Context xml file under <Host Name> )

May be it generates one under META-INF/context.xml , but may be empty as in
<Context path="">
</Context>



> --
> Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
> Typically when a software vendor says that a product is "intuitive" he
> means the exact opposite.
>

Regards
Rashmi

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


Re: How-to make default Running status = false

Posted by "Mark H. Wood" <mw...@IUPUI.Edu>.
On Thu, May 24, 2007 at 09:01:13PM -0400, Rashmi Rubdi wrote:
> On 5/23/07, Roger Tismeer <rt...@initiatesystems.com> wrote:
> >It takes about 4 minutes or so to (re)start Tomcat .... granted I have
> >30 webapps loaded, but isn't there a switch somewhere that I can toggle
> >to not auto-start any non-Tomcat webapps?
> 
> I was in a similar situation as you've mentioned above.
> 
> I find that keeping the Context descriptor outside server.xml makes it
> a lot easier to switch between applications.

I'll have to remember that one.  Thanks!

> Say your apps are named app1, app2, app3 etc and if you access them as
> 
> http://localhost:8080/app1  http://localhost:8080/app2
> http://localhost:8080/app3 , then
> 
> you would define the Context for each app under
> 
> Tomcat's /conf/Catalina/localhost/  as app1.xml , app2.xml and app3.xml
> 
> Now if you want Tomcat to only load app1 , you just disable the other
> XML files by renaming them as in app2.xml_disable app3.xml_something

In that case, you have to either ensure that your webapp.s do not
contain META-INF/context.xml or that the Host has deployXML='false'.
Otherwise the webapp itself will supply a Context.

Tomcat will generate a Context on its own in some circumstances which
I've not yet completely worked out from the documentation.  How did
you disable this?

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Typically when a software vendor says that a product is "intuitive" he
means the exact opposite.


Re: How-to make default Running status = false

Posted by Rashmi Rubdi <ra...@gmail.com>.
On 5/23/07, Roger Tismeer <rt...@initiatesystems.com> wrote:
> It takes about 4 minutes or so to (re)start Tomcat .... granted I have
> 30 webapps loaded, but isn't there a switch somewhere that I can toggle
> to not auto-start any non-Tomcat webapps?

I was in a similar situation as you've mentioned above.

I find that keeping the Context descriptor outside server.xml makes it
a lot easier to switch between applications.

Say your apps are named app1, app2, app3 etc and if you access them as

http://localhost:8080/app1  http://localhost:8080/app2
http://localhost:8080/app3 , then

you would define the Context for each app under

Tomcat's /conf/Catalina/localhost/  as app1.xml , app2.xml and app3.xml

Now if you want Tomcat to only load app1 , you just disable the other
XML files by renaming them as in app2.xml_disable app3.xml_something

The above setting will make only app1 visible to Tomcat, when you want
to switch, just rename the Context file back to .xml

Alternatively , if you want all apps to be accessible at the root
context, you just set up virtual hosts, in this case each context
would be called ROOT.xml under it's own host, just disable the
ROOT.xml files of those apps you don't want to load.


> This way I can simply Start
> the few apps I need via the Manager and as I need more or less, I can do
> so.

However, it is not possible to use the Manager app to toggle the
Context XML files' extension, you'd be toggling the extension
manually.

It's a simple way to switch off apps, or switch between apps whenever you want.

>
> Thanks,
>
> Roger Tismeer

-Regards
Rashmi

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