Dear All I was ask this question at an interview. But i do not know whether it is possible or not. Can anyone help. The interviewer asked me "how will you find out that the servlet was already existing or is newly created".
It is also possible to track the usage of the Class via either a static or instance block in the code or even the no-arg constructor, but as has been mentioned above, I'd still prefer to do it in the init() method.