tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ALEXANDROS KOTSIRAS" <ALEXANDRO...@prodigy.net>
Subject Re: Init method of the servlet getting called five times
Date Sat, 19 Aug 2000 09:33:39 GMT
Maybe this is not the reason in your case but in general if you  are using inheritance with
your servlets, every time that 
the init() method of a child Servlet is called it will always call first the init() method
of the parent Servlet even if the parent Servlets init() was called before. So if you have
5 child servlets your parent servlet's init() will be called at least 5+1 times. This behavior
though should be identical on JServ and Tomcat.

Alex.
  ----- Original Message ----- 
  From: Harish Rawat 
  To: tomcat-user@jakarta.apache.org 
  Sent: Friday, August 18, 2000 7:38 PM
  Subject: Init method of the servlet getting called five times


  I saw a strange behaviour in tomcat. While loading a servlet it calls the init method five
times (and the destroy method is not called),  whereas with Jserv for the same servlet the
init method is called only once.

  Any reasons why this could be happening?
  Thanks
  Harish

Mime
View raw message