tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pid *" <...@pidster.com>
Subject Re: Filter questions
Date Wed, 01 Dec 2010 17:41:55 GMT
On 1 Dec 2010, at 17:28, Leo Donahue - PLANDEVX
<LeoDonahue@mail.maricopa.gov> wrote:

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

More direct answer:

ROOT is the ServletContext, the file is served by the default servlet.


p

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message