On 3 March 2013 14:32, Mark Thomas <ma...@apache.org> wrote:

> On 03/03/2013 14:24, James Green wrote:
> > On 3 March 2013 11:34, Konstantin Kolinko <knst.koli...@gmail.com>
> wrote:
> >
> >> 2013/3/3 James Green <james.mk.gr...@gmail.com>:
>
> > So now I have a war deployed. Easy enough. Now to set the URL path.
> There a
> > lot of talk about Context Descriptors on that page, and at the top one
> > seems to be read from webapps/[my-war-file]/META-INF/context.xml.
> Perfect,
> > but what goes in it?
> >
> > Elsewhere, I find Config, and in there we find Context. Aha! Parallel
> > Deployment? Nope don't want that. Naming? I read that several times, and
> I
> > have no idea still what is trying to be expressed. Does it even apply to
> > me? Not sure, let's move on
>
> Stop here. The naming section is exactly the bit you need to understand.
>
> I'm sure there is scope to improve the docs so if you explain where you
> start to get lost we can look at improving the wording / adding
> additional explanation as required.
>  <users-h...@tomcat.apache.org>
>

Diving straight into the Naming section then we describe a relationship
involving these elements:

- Context Name
- Context Version
- Context Path
- Base file name

Is the base file name the name of the war file built?
Are the context elements name, version and path, supposed to come from the
context.xml file? Other than path, they are not listed in the attributes
further down the page.

So now I'm being told that a set of rules apply when no version is
specified. Still no idea where a version gets specified though: is it read
from the war filename? Going to have to ignore this for now.

Now on to something that appears reasonably clear: If you want to deploy a
WAR file or a directory using a context path that is not related to the
base file name - yes! then one of the following options must be used to
prevent double-deployment - double deployment? Does this still apply to
deployment in general or some particular circumstance in which
double-deployment would happen?

Disable autoDeploy and deployOnStartup and define all Contexts in
server.xml - given the dynamic nature of our development, that is
definitely not desirable
Locate the WAR and/or directory outside of the Host's appBase and use a
context.xml file with a docBase attribute to define it. - you want me to
hook in the war from outside Tomcat? Not clear why I would want to do that.

If I may digress some further: Looking at the FAQ, under Deployment, I'm am
told that META-INF/context.xml is still recommended for Tomcat 7. I am
still left wondering what I should be doing...

James

Reply via email to