You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by N G <ni...@gmail.com> on 2006/04/05 07:44:09 UTC
Tomcat triggers ServletRequestListener twice per request...
Hi,
I have a regular HTML page and a ServletRequestListener. For some
reason Tomcat invokes requestInitialized and requestDestroyed twice
for every client request.
In other words:
requestInitialized
requestDestroyed
requestInitialized
requestDestroyed
Could someone explain to me why this is happening? I have NO Filters
or MVC going on here. Just a regular HTML page.
--
Thanks,
NG
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat triggers ServletRequestListener twice per request...
Posted by N G <ni...@gmail.com>.
Ahhhhhhhhh! I forgot about the stylesheet! Make perfect sense!
Thanks!
On 4/5/06, Tim Lucia <ti...@yahoo.com> wrote:
> Or the HTML page has a stylesheet link or javascript link or an image tag or
> anything else. As Mark says, use a client tool to trace the requests from
> the browser.
>
> Tim
>
> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Wednesday, April 05, 2006 2:14 AM
> To: Tomcat Users List
> Subject: Re: Tomcat triggers ServletRequestListener twice per request...
>
> N G wrote:
> > Hi,
> >
> > I have a regular HTML page and a ServletRequestListener. For some
> > reason Tomcat invokes requestInitialized and requestDestroyed twice
> > for every client request.
> > In other words:
> > requestInitialized
> > requestDestroyed
> > requestInitialized
> > requestDestroyed
> >
> > Could someone explain to me why this is happening? I have NO Filters
> > or MVC going on here. Just a regular HTML page.
>
> At a guess, the browser is making two requests. One for your page and
> one for favicon.ico
>
> Use ieHttpheaders (for IE) or Live Http Headers (for Firefox) to
> confirm this.
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
--
Thanks,
NG
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat triggers ServletRequestListener twice per request...
Posted by Tim Lucia <ti...@yahoo.com>.
Or the HTML page has a stylesheet link or javascript link or an image tag or
anything else. As Mark says, use a client tool to trace the requests from
the browser.
Tim
-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org]
Sent: Wednesday, April 05, 2006 2:14 AM
To: Tomcat Users List
Subject: Re: Tomcat triggers ServletRequestListener twice per request...
N G wrote:
> Hi,
>
> I have a regular HTML page and a ServletRequestListener. For some
> reason Tomcat invokes requestInitialized and requestDestroyed twice
> for every client request.
> In other words:
> requestInitialized
> requestDestroyed
> requestInitialized
> requestDestroyed
>
> Could someone explain to me why this is happening? I have NO Filters
> or MVC going on here. Just a regular HTML page.
At a guess, the browser is making two requests. One for your page and
one for favicon.ico
Use ieHttpheaders (for IE) or Live Http Headers (for Firefox) to
confirm this.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat triggers ServletRequestListener twice per request...
Posted by Mark Thomas <ma...@apache.org>.
N G wrote:
> Hi,
>
> I have a regular HTML page and a ServletRequestListener. For some
> reason Tomcat invokes requestInitialized and requestDestroyed twice
> for every client request.
> In other words:
> requestInitialized
> requestDestroyed
> requestInitialized
> requestDestroyed
>
> Could someone explain to me why this is happening? I have NO Filters
> or MVC going on here. Just a regular HTML page.
At a guess, the browser is making two requests. One for your page and
one for favicon.ico
Use ieHttpheaders (for IE) or Live Http Headers (for Firefox) to
confirm this.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org