tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan" <cmcclana...@mytownnet.com>
Subject Re: Connector -- Context Manager relation
Date Tue, 09 Nov 1999 02:15:10 GMT
costin@eng.sun.com wrote:

> > One question would be if there should be something in between the Connector and
> > Host layers that filters all incoming requests.  An advantage of this approach is
> > that you could install Interceptor type logic at any or all of the levels (entire
> > servlet engine, host, context, or wrapper) depending on your needs.
>
> It is a very  good ideea - the Interceptor behavior is very similar with Apache
> modules, i.e. it pre-process the request_rec in various ways.
>
> That may make the code cleaner and easier to follow - we can have a Interceptors
> that parse the request line and extract vhost/context ( and fix the paths),
> etc.
>
> About "Host" - what's the meaning of "host" in terms of servlet api, and why
> is it needed?

It wouldn't be needed for the servlet API, but would be useful if you wanted to give an
ISP, for example, a place to inject Interceptors that processed all requests to a
particular customer's virtual host -- and the ability to use separate interceptors for
each separate customer.

> Right now we have the server singleton ( == a tomcat engine instance,
> ContextManger ), and we have Contexts. It is up to ContextManager ( with help
> from Adapter and maybe Interceptors ) to find the right context and invoke service.
> I don't see a need to add a "virtual host" concept into this picture ( as a class
> with this
> name,  the logic is already inside the ContextManager code ).
> ( this also avoids the discussion about "can a Context be shared across multiple
> virtual
> hosts" :-)
>

We can skip the discussion as long as you enforce the spec prohibition against crossing
boundaries :-).

>
> Costin
>

Craig



Mime
View raw message