You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ian McFarland <im...@neo.com> on 2002/07/19 04:56:19 UTC

Need help deciphering the docs for

Hello,

The docs say that the Host tag can take a deployXML attribute, and has 
the following explanation:

"Set to false if you want to disable deploying applications using a 
Context XML config file. Applications are deployed with the security 
permissions of catalina, for security this may need to be set to false 
if untrusted users can manage web applications. The flag's value 
defaults to true." (From 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Standard%20Implementation)

What is meant by 'a Context XML config file'? Is this a deployment 
descriptor? (A web.xml) Something different?

Also, I noticed that the server.xml file doesn't have the standard XML 
preamble (No <?xml?> tag, and no DTD reference.) Is there a DTD for this 
file, or is it more of an ad hoc kind of thing? Should I be asking this 
on the developer list instead? Let me know. (I always try to ask stuff 
on the user list first, as a courtesy, but this seems like it might be 
more a developer list question.)

Thanks in advance!
-Ian


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Need help deciphering the docs for

Posted by Ian McFarland <ia...@neo.com>.
Thanks for the excellent (and speedy) answers!

The context config thing makes a lot of sense. I just couldn't find it 
defined anywhere in the docs. (Google-ing didn't even help.) Since it's 
new, it's probably just not covered much yet, I guess.

I sort of figured that a DTD wasn't going to work, at least not with a 
validating parser, because as you say, new components can define 
additional attributes. I also noticed that order doesn't seem to be 
strictly enforced (or maybe so far I've just gotten lucky.) I guess I 
was hoping that there was a DTD that included the known elements, more 
by way of a spec than for validation purposes.

As to why I care: I just wanted a reference that listed everything out 
in a really terse form. It seems to be pretty much all there in the 
configuration docs, though.

Cheers,
-Ian

On Thursday, July 18, 2002, at 08:16 PM, Craig R. McClanahan wrote:

>
>
> On Thu, 18 Jul 2002, Ian McFarland wrote:
>
>> Date: Thu, 18 Jul 2002 19:56:19 -0700
>> From: Ian McFarland <im...@neo.com>
>> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
>> To: Tomcat Users List <to...@jakarta.apache.org>
>> Cc: Ian McFarland <ia...@neo.com>
>> Subject: Need help deciphering the docs for <Host/>
>>
>> Hello,
>>
>> The docs say that the Host tag can take a deployXML attribute, and has
>> the following explanation:
>>
>> "Set to false if you want to disable deploying applications using a
>> Context XML config file. Applications are deployed with the security
>> permissions of catalina, for security this may need to be set to false
>> if untrusted users can manage web applications. The flag's value
>> defaults to true." (From
>> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Standard%20Implementation)
>>
>> What is meant by 'a Context XML config file'? Is this a deployment
>> descriptor? (A web.xml) Something different?
>>
>
> In Tomcat 4.1.x, you can take the <Context> element (and it's nested
> elements) out of server.xml and manage them in a separate file called a
> "context config file".  If one of these files is found in the "webapps"
> directory, that application will get deployed with a configuration based
> on the contents of this file, just as if it had been embedded inside the
> <Host> element in server.xml.
>
> In the 4.1.7 beta release, for example, the admin and manager webapps 
> are
> deployed in this way.
>
>> Also, I noticed that the server.xml file doesn't have the standard XML
>> preamble (No <?xml?> tag, and no DTD reference.) Is there a DTD for 
>> this
>> file, or is it more of an ad hoc kind of thing? Should I be asking this
>> on the developer list instead? Let me know. (I always try to ask stuff
>> on the user list first, as a courtesy, but this seems like it might be
>> more a developer list question.)
>>
>
> There should probably be an <?xml?> tag at the top.
>
> For DTDs, however, there is not and cannot be one.  The challenge is 
> that
> you can define your own implementation classes for many elements
> (including <Valve>, just to take one example), and your implementation
> class might have a set of JavaBeans properties to configure it.  If you
> built a DTD for server.xml, the information about the <Valve> element
> would not list the attributes for the properties supported by your Valve
> class.
>
>> Thanks in advance!
>> -Ian
>>
>
> Craig
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Need help deciphering the docs for

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 18 Jul 2002, Ian McFarland wrote:

> Date: Thu, 18 Jul 2002 19:56:19 -0700
> From: Ian McFarland <im...@neo.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Cc: Ian McFarland <ia...@neo.com>
> Subject: Need help deciphering the docs for <Host/>
>
> Hello,
>
> The docs say that the Host tag can take a deployXML attribute, and has
> the following explanation:
>
> "Set to false if you want to disable deploying applications using a
> Context XML config file. Applications are deployed with the security
> permissions of catalina, for security this may need to be set to false
> if untrusted users can manage web applications. The flag's value
> defaults to true." (From
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Standard%20Implementation)
>
> What is meant by 'a Context XML config file'? Is this a deployment
> descriptor? (A web.xml) Something different?
>

In Tomcat 4.1.x, you can take the <Context> element (and it's nested
elements) out of server.xml and manage them in a separate file called a
"context config file".  If one of these files is found in the "webapps"
directory, that application will get deployed with a configuration based
on the contents of this file, just as if it had been embedded inside the
<Host> element in server.xml.

In the 4.1.7 beta release, for example, the admin and manager webapps are
deployed in this way.

> Also, I noticed that the server.xml file doesn't have the standard XML
> preamble (No <?xml?> tag, and no DTD reference.) Is there a DTD for this
> file, or is it more of an ad hoc kind of thing? Should I be asking this
> on the developer list instead? Let me know. (I always try to ask stuff
> on the user list first, as a courtesy, but this seems like it might be
> more a developer list question.)
>

There should probably be an <?xml?> tag at the top.

For DTDs, however, there is not and cannot be one.  The challenge is that
you can define your own implementation classes for many elements
(including <Valve>, just to take one example), and your implementation
class might have a set of JavaBeans properties to configure it.  If you
built a DTD for server.xml, the information about the <Valve> element
would not list the attributes for the properties supported by your Valve
class.

> Thanks in advance!
> -Ian
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>