I have just tried this and it causes my app to stop working.
Does this now mean that I need to put the context into
%TOMCAT_HOME%\conf\web.xml, because this is a bit of a pain.
Dave.
-----Original Message-----
From: Alistair Hopkins [mailto:[EMAIL PROTECTED]]
Sent: 07 November 2000 15:37
To: [EMAIL PROTECTED]
Subject: RE: init being called twice
I had this.
In my case, it was caused by setting my context to be the root context.
I solved it by removing the
<ContextInterceptor className="org.apache.tomcat.context.AutoSetup"
/>
line from server.xml, so that only contexts explicitly defined in web.xml
were loaded.
At 03:29 PM 11/7/00 +0000, you wrote:
>If your talking about the %TOMCAT_HOME%\conf\web.xml, then no it is not
>defined in there. It is also not defined in %TOMCAT_HOME%\conf\server.xml.
>All I have is the context\WEB-INF\web.xml which I have attached.
>I have done some further tests and I actually have a new object of my
>servlet class. So it is calling init in one instance of the class and then
>creating a new instance of the class and calling init again when the first
>request is made. It makes no further calls to init after this.
>Also the init method is completing succesfully with no exceptions.
>
>On a side point what does the number in the <load-on-startup> tag in
web.xml
>mean.
>
>-----Original Message-----
>From: William Brogden [mailto:[EMAIL PROTECTED]]
>Sent: 07 November 2000 14:49
>To: [EMAIL PROTECTED]
>Subject: Re: init being called twice
>
>
>
>
>David Oxley wrote:
> >
> > Does anyone know why the init method is being called twice. I'm using
> > tomcat3.2b6 with IIS5 on W2K linked with isapi_redirect.dll. I have also
> > seen this with 3.1 with apache 1.3.12 on Solaris 7 linked with
>mod_jserv.so.
> >
> > I can code around this so that the second time through it doesn't call
my
> > init stuff again, but surely this is a bug?!
> >
> > Any comments?
> > Dave
> > [EMAIL PROTECTED]
>
>Seems to me I recall that being traced to having a servlet entry in
>both the base web.xml and application context web.xml.
>
>--
>WBB
>