tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donie Kelly <donie.ke...@tecnomen.ie>
Subject RE: Init method of servlet called twice?
Date Wed, 06 Feb 2002 20:04:26 GMT
Yes, Randy, you're right I have two mappings for the same servlet. Can you
tell me how to search the archives. Where are they? I only receive this list
by mail and have just deleted last weeks list.

Thanks for the help
Donie


-----Original Message-----
From: Randy Layman [mailto:randy.layman@aswethink.com]
Sent: February 06, 2002 19:11
To: 'Tomcat Users List'
Subject: RE: Init method of servlet called twice?



	Craig posted a technical explanation of this about two weeks ago, so
search the archives for that, but the short version is that for every unique
address that your servlet responds to the init method will be called.
Having an alias for your servlet (so you can pass parameters) and using the
servlet invoker (i.e. /servlets/com.whatever) is the most common way of
having this happen.  To solve your problem you need to modify the web.xml
file so that your servlet is only referenced once.

	Randy


> -----Original Message-----
> From: Donie Kelly [mailto:donie.kelly@tecnomen.ie]
> Sent: Wednesday, February 06, 2002 2:42 PM
> To: 'Tomcat Users List'
> Subject: Init method of servlet called twice?
> 
> 
> Hi all
> 
> Can anybody tell me why the init method can be called twice 
> in a servlet. I
> am loading the servlet on startup and init is first called there.
> 
> The first request to the servlet then calls the same init 
> method again?
> Please help. I cannot init twice.
> 
> Thanks
> Donie
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message