tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Donahue - PLANDEVX <LeoDona...@mail.maricopa.gov>
Subject RE: Filter questions
Date Wed, 01 Dec 2010 17:27:43 GMT
>-----Original Message-----
>From: Pid * [mailto:pid@pidster.com]
>Subject: Re: Filter questions
>
>On 1 Dec 2010, at 14:35, Leo Donahue - PLANDEVX
><LeoDonahue@mail.maricopa.gov> wrote:
>
>> Servlet Spec 2.5
>> SRV.6.2.1
>>
>> "The container provides the filter config as
>> declared in the filter's deployment descriptor, the reference to the
>ServletContext
>> for the Web application, and the set of initialization parameters.'
>>
>> 1.      How does Tomcat get a reference to a ServletContext before any
>servlet is created?
>
>Servlets exist inside the context, not the other way round.
>
>> 2.      If a filter can be mapped to a static resource, what is the
>servlet context?
>
>The app is the context.
>
>
>p
>

Thanks, I realized the context part about 20 seconds after I posted and totally forgot about
the default servlet.

I'll read the spec front to back, as suggested.

In the meantime I was trying to understand how/when "servletness" occurs.

http://localhost:8080  will load index.html, because of the welcome file, in ROOT but that's
not a servlet.  
Are you saying that the servletcontext here is the Default Servlet mapped to / ?
Mime
View raw message