I am not a Tomcat expert - I am just using it in Eclipse to develop my application.
When I start it, I have just realised that the listener which has code to execute when I start Tomcat is executed twice.
I read somewhere that there was a bug in a couple of versions of Tomcat in which it happened, but I believe it must have something to do with my local environment because
- when I upload my application to the web host and I start it, it doesn't happen.
- I tried different versions of Tomcat locally ( 6.0.35 and 7.0.26 and another one which I can't remember ) and it always happens.
I haven't played with the configuration files at all - I have just unzipped the Tomcat folder and linked to it from Eclipse.
Can anybody suggest where it ( or I? ) could be going wrong?
Joined: Jul 04, 2011
This solution worked for me:
In Tomcat's server.xml, I commented out this line and now it all works as it should.
If your original line contains the contaning tag for HOST, make sure you leave that out of the comment.