If you want to perform some task when a session is created or destroyed, which listener should you implement?
- HttpSessionAttributeListener
- HttpSessionListener
- ServletContextListener
- ServletRequestListener
The HttpSessionListener interface is used to perform tasks when a session is created or destroyed.
Loading...
Related Quiz
- What is a common strategy for handling the situation when all connections in the pool are in use?
- How can a servlet-based application detect and handle WebSocket upgrade requests?
- In asynchronous servlets, the __________ method of AsyncContext sends the response to the client.
- Which listener is used to track changes to the attributes of the ServletRequest?
- When refactoring a servlet to make it more configurable, what changes are made regarding initialization parameters?