tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boris <>
Subject Re: Tomcat-6.0.6 - path attribute not honored in Context descriptor files.
Date Thu, 21 Dec 2006 14:14:32 GMT
I know that it works according to the documentation but I can't
ignore the fact that I believe it's wrong. If you look closer in
the code of HostConfig.deployDescriptors() you note that others has
missed the ability to set the context path and has hidden it in the
filename which is neither portable nor documented.

            File contextXml = new File(configBase, files[i]);
            if (files[i].toLowerCase().endsWith(".xml")) {

                // Calculate the context path and make sure it is unique
                String nameTmp = files[i].substring(0, files[i].length() - 4);
                String contextPath = "/" + nameTmp.replace('#', '/');
                if (nameTmp.equals("ROOT")) {
                    contextPath = "";

If you understand me I believe it's a mistake to tie the Context
descriptors file name to the context path while there is a clean and
documented way of defining the path in the context tag. In this aspect
I believe the way it worked in TC-4.1 is to prefer and I ask you
to reconsider it.


Markus Schönhaber wrote:
> boris wrote:
>> The problem 
>> is that the "path" attribute is ignored in the Context read from this
>> directory. Only Contexts defined in the server.xml file honors the
>> path attribute.
> That's not a problem. It's exactly the way it's meant to be:
> | The value of this field must not be set except when statically defining a
> | Context in server.xml, as it will be infered from the filenames used for
> | either the .xml context file or the docBase.  
> BTW: for support questions you should post to the users list.
> Regards
>   mks
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

                              (o o)
    You know you've achieved perfection in design,
        NOT when you have nothing more to add,
            but when you have nothing more to remove.
Boris Prochazka                 E-mail:
Arenavagen 23, Box 101 60
SE-121 28 Stockholm Globen      [home]   +46  8  - 6040786
                                [office] +46  8  - 7255919
SWEDEN                          [mobile] +46 70  - 5125122

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

View raw message