Thanks Chuck,

I just tested this by creating a context element in its own file under
conf/Catalina/localhost/jnditest.xml and that worked. (BTW, Tomcat 6
docs states that docBase is a valid attribute in this situation. It is
only illegal when the <Context/> element is defined within
META-INF/context.xml.):
<Context docBase="jndistring.war"
        useNaming="true">

    <Environment name="teststring"
            value="a test value"
            type="java.lang.String"
            override="false"
    />
</Context>

I had chosen the server.xml approach because I wish to deploy some
applications as the default/ROOT, and I haven't had any success in
doing that using this approach (unless I named the application ROOT,
which is less than ideal). Others have raised a bug report against
this particular difficulty, and I recently contributed a comment, but
it was dealt with in an unhelpful manner:
https://issues.apache.org/bugzilla/show_bug.cgi?id=41746
Well, that's for another question on this mailing list!

Would folks here, then, be inclined to believe that there is a bug in
using <Context/> within a server.xml file? - given that I'm using only
a slightly changed <Context/> configuration (the "path" attribute
being the only change). I'm hesitant to raise a bug for fear of being
flamed again!

Thanks,

Paul.

2008/9/3 Caldarale, Charles R <[EMAIL PROTECTED]>:
>> From: Paul Pepper [mailto:[EMAIL PROTECTED]
>> Subject: Problem with JNDI environment entry resources
>>
>> Can anyone suggest what I might have missed?
>
> What happens if you follow the (strongly) recommended practice of not putting 
> <Context> elements in server.xml?  If you don't want to put the <Context> 
> inside your .war file (understandable), put it in 
> conf/Catalina/localhost/jndistring.xml, and remove the illegal docBase and 
> path attributes.
>
>  - 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
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