hi ..got the difference in case of httpsessionlisenter
1.It will be listening in case of session obect creation and invalidate .
In case of httpsessionattributelistener
1.It will be monitored for each attribute action.
Joined: Apr 10, 2010
If you write a class that implements HttpSessionListener it will be stay there in silent in your container until the session is created or invalidated. But when a new session is created it will wake up and do whatever you wrote in the method
When the session expires or if it's invalidated the other method is called:
When i write
your class couldn't care less about it, because no session was created nor destroyed.