I have a servlet with a value of 10 for load-on-startup. When Tomcat starts, init() gets called. Then, when I hit the servlet with the browser, init() gets called again. Why does that happen?
I think it's related to this output to my console window:
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
What's this? I can't find any documentation about the existence of two processes, each of which apparently calls my servlet's init() method.
-
Mysterious Tomcat 4 start-up behavior (1 messages)
- Posted by: Ignatius Reilly
- Posted on: November 30 2001 20:06 EST
Threaded Messages (1)
- Mysterious Tomcat 4 start-up behavior by Matt Veitas on December 13 2001 10:55 EST
-
Mysterious Tomcat 4 start-up behavior[ Go to top ]
- Posted by: Matt Veitas
- Posted on: December 13 2001 10:55 EST
- in response to Ignatius Reilly
Take a look through the logs generated by Tomcat. Most likely your servlet is not being initialized properly. Tomcat will attempt to reload the servlet when a second request is generated to the servlet.
Matt