On 5/25/07, Mark H. Wood <[EMAIL PROTECTED]> 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   [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to