Reputation: 11
I am trying to identify when a servlet is initilazed (not the init() method called), when container try to load an individual servlet ? Or, any mechanism which keeps track of servlet initialized / destroyed / pending to load.
I am aware of the ServletContextListner, which invoked on application start & shutdown. But, I am looking for kind of listener, which probably trigger on individual servlet load / destroy event.
So, scenario would be like : /Servlet1 /Servlet2 An listener which trigger on servlet1 load and then for Servlet2.
Upvotes: 1
Views: 539
Reputation: 2290
I guess this is the listener you are looking for .You want to know each time a request comes in, so that you can log it. javax.servlet.ServletRequestListener . Following are the methods requestInitialized requestDestroyed
Upvotes: 0