Re: Servlet.init() called two times
Tuesday, February 8, 2005 02:24 AM
Would like to know few things about your application deployment descriptor,
1) Tomcat version you have been using
2) Servlet entry in your web.xml (Assuming you are keeping your application's web.xml file in the WEB-INF directory under your application directory.)
Please understand the significance of load-on-startup parameter for numbers 0,1,.. in Tomcat 5.X versions.
Make sure that ServletException is not thrown in some perticular condition in your servlet code.
Servlet engine will call init method whenever ServletException is thrown and till the time servlet is placed into memory.
This is just a probable reason.
Exact thing could be told if you paste your entries in web.xml as well as server.xml deployment descriptor files.