init being called twice

2000-11-07 Thread David Oxley

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]



Re: init being called twice

2000-11-07 Thread William Brogden



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



RE: init being called twice

2000-11-07 Thread Byung Jin Chun

David,
   try using a positive integer value for your load on startup element.
Here is the snippet from the dtd:

!-- The load-on-startup element indicates that this servlet should be
loaded on the startup of the web application. The optional contents of
these element must be a positive integer indicating the order in which
the servlet should be loaded. Lower integers are loaded before higher
integers. If no value is specified, or if the value specified is not a
positive integer, the container is free to load it at any time in the
startup sequence. --

!ELEMENT load-on-startup (#PCDATA)


Jin

-Original Message-
From: David Oxley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 07, 2000 10:30 AM
To: '[EMAIL PROTECTED]'
Subject: RE: init being called twice


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




RE: init being called twice

2000-11-07 Thread David Oxley

I've tried it with 0 and with 5, but I still have the same problem.

-Original Message-
From: Byung Jin Chun [mailto:[EMAIL PROTECTED]]
Sent: 07 November 2000 15:52
To: '[EMAIL PROTECTED]'
Subject: RE: init being called twice


David,
   try using a positive integer value for your load on startup element.
Here is the snippet from the dtd:

!-- The load-on-startup element indicates that this servlet should be
loaded on the startup of the web application. The optional contents of
these element must be a positive integer indicating the order in which
the servlet should be loaded. Lower integers are loaded before higher
integers. If no value is specified, or if the value specified is not a
positive integer, the container is free to load it at any time in the
startup sequence. --

!ELEMENT load-on-startup (#PCDATA)


Jin

-Original Message-
From: David Oxley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 07, 2000 10:30 AM
To: '[EMAIL PROTECTED]'
Subject: RE: init being called twice


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