tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: Context.xml ignored.
Date Sun, 03 Mar 2013 15:51:35 GMT
On 03/03/2013 15:29, James Green wrote:
> On 3 March 2013 14:32, Mark Thomas <> wrote:
>> On 03/03/2013 14:24, James Green wrote:
>>> On 3 March 2013 11:34, Konstantin Kolinko <>
>> wrote:
>>>> 2013/3/3 James Green <>:
>>> 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.
>>  <>
> 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.

OK. Lets address the above. Once you are happy you understand what is
going on, I'll suggest an update to the docs that you can review.

Context path is as defined in the Servlet specification.

Context name is the unique identifier for a context within a host. If no
version is specified (none is needed unless parallel deployment is being
used) then context name is identical the the context path. If a version
is specified then ##ContextVersion is appended to the context path to
create the context name.

Context version is a version identifier that is used under parallel
deployment when multiple versions of the same application are deployed
with the same context path.

Base file name is the common part of the file named used for the WAR
(baseFileName.war) directory (baseFileName) or context.xml file
(baseFileName.xml) from which the application is deployed.

Context name is derived from base file name by:
- replacing any single '#' characters with '/'
- if the base file name starts with "ROOT", replacing "ROOT" with the
empty string
- if the base file name does not start with "ROOT", pre-pending a
leading '/'

The base file name controls the context path. If you want to change the
context path, the simplest solution is to change the base file name.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message