Package com.jk.web.servlets
Class JKWebContextListener
java.lang.Object
com.jk.web.servlets.JKWebContextListener
- All Implemented Interfaces:
jakarta.servlet.ServletContextListener
,EventListener
@WebListener
public class JKWebContextListener
extends Object
implements jakarta.servlet.ServletContextListener
This class is a ServletContextListener responsible for initializing and
cleaning up resources during the life cycle of a web application.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
contextDestroyed
(jakarta.servlet.ServletContextEvent sce) This method is called when the web application context is destroyed.void
contextInitialized
(jakarta.servlet.ServletContextEvent event) This method is called when the web application context is initialized.void
init()
This method initializes theJKWebContextListener
.
-
Constructor Details
-
JKWebContextListener
public JKWebContextListener()
-
-
Method Details
-
init
public void init()This method initializes theJKWebContextListener
. -
contextInitialized
public void contextInitialized(jakarta.servlet.ServletContextEvent event) This method is called when the web application context is initialized.- Specified by:
contextInitialized
in interfacejakarta.servlet.ServletContextListener
- Parameters:
event
- Specifies the ServletContextEvent associated with context initialization.
-
contextDestroyed
public void contextDestroyed(jakarta.servlet.ServletContextEvent sce) This method is called when the web application context is destroyed.- Specified by:
contextDestroyed
in interfacejakarta.servlet.ServletContextListener
- Parameters:
sce
- Specifies the ServletContextEvent associated with context destruction.
-