tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: XML config [ was: Re: MS IIS and Apache feature war]
Date Sun, 16 Jan 2000 22:58:51 GMT
costin@costin.dnt.ro wrote:
> 
> > > >   <Module name="if">
> > > >     <If host="somewhere.nowhere.com" port="1234">
> > > Can you add few more examples ( how would VHost work ? )
> >
> > That _was_ the vhost example!
> 
> Ops.
> 
> > Well, "If" is just a word, what I'm trying to suggest is that the module
> > that implements <If...> would include (or not) the enclosed XML
> > depending on whether it matched the current values for context
> > variables.
> 
> Ok, I still don't understand how it works.
> 
> You have a "context" - that will match a set of requests.
> You define the context using the <if> module ( and
> "context" in apache will mean vhost, regexp-matched
> locations, directories, etc).
> 
> Inside the <if> you set all context-related properties,
> including handler, etc.
> 
> Some other modules will use the <module> syntax to configure
> themself, and in <if> you reference them using the name.
> All if config goes under the directory cache, and
> probably "global" modules under server cache.
> 
> Am I far away from your meaning ( if so probably I'm a
> lost cause for configuration ... )

No, that's pretty close to what I mean (which leaves me wondering what
you think you don't understand!).

> > > Also, I would prefer ant-like module configuration:
> > >
> > > <module file="mod_jserv.so" port="8007" />
> > > ( for simple modules - or with child if it's a complex moduel)
> >
> > That destroys the point - if the thing that implements <module...> also
> > has to deal with all the conditional stuff, you've thrown away the
> 
> In this example <module> implementation deal only with
> instantiating a <jserv> object and setting the properties.
> ( alternate syntax would be <jserv port="8007"  /> )
> <Module> doesn't deal with anything else but  config.

Ah, in this case, the port is some internally used port, not the vhost
port?

> > > Or even:
> > >
> > > <module file="mod_jserv.so" tag="jserv" />
> > >
> > > <jserv>
> > >    <engine port="8007" host="loadB1"/>
> > >    <engine port="8007" host="loadB2" />
> > > </jserv>
> > >
> > > In terms of Servlet API we just have to deal with one kind of "Context"
> > > ( where a context is VHost + Location combination ).
> >
> > Well, that's nice for you, but it doesn't solve the general problem. I
> > also rather suspect it isn't really true - if it were, I would guess
> > that Apache wouldn't need all the extra fun stuff, either.
> 
> I think we are talking about different things.
> 
> One is "top-level" modules ( like handlers, mime-mappers, etc)
> that are not involved in matching a request. ( mod_jserv is
> one case, and tomcat configuration will deal mostly with
> this kind of modules )
> 
> The other is <context> - with all forms ( vhost, directory,
> location, etc) - where again, the "active" part is used
> in matching and the extra info (setHandler, auth) is used only
> if the request match.

Right.

> I have no ideea how to do that
> in tomcat - but since the spec requires only "Vhost+Location"
> I don't need to worry. ( and tomcat+apache will just use
> apache definitions ).

Well hold on there, pardner. Vhost+Location is really all the Apache
deals with, it just does it in a variety of ways - so the location can
be matched by a regex, or after it has been translated to a native path,
and so on.

Now, the mechanism I'm proposing could also go beyond vhost+location,
but even dealing with that in a consistent and clear way would be a step
forward, and making it universal would be a big step forward.

> Do you make this distinction in your XML ?

Indeed, as I _think_ you understand (you just think you don't :-).

Cheers,

Ben.

--
SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm

http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

Mime
View raw message