Package com.jk.webstack.listeners
Class JKWebstackContextListener
java.lang.Object
com.jk.webstack.listeners.JKWebstackContextListener
- All Implemented Interfaces:
jakarta.servlet.ServletContextListener
,EventListener
@WebListener
public class JKWebstackContextListener
extends Object
implements jakarta.servlet.ServletContextListener
This class is a ServletContextListener that initializes and configures
JKWebstackContextListener
when the web application starts.- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
contextDestroyed
(jakarta.servlet.ServletContextEvent sce) Receives notification that the ServletContext is about to be shut down.void
contextInitialized
(jakarta.servlet.ServletContextEvent event) Receives notification that the web application initialization process is starting.void
init()
This method initialize theJKWebstackContextListener
.
-
Constructor Details
-
JKWebstackContextListener
public JKWebstackContextListener()
-
-
Method Details
-
init
public void init()This method initialize theJKWebstackContextListener
. -
contextInitialized
public void contextInitialized(jakarta.servlet.ServletContextEvent event) Receives notification that the web application initialization process is starting.All ServletContextListeners are notified of context initialization before any filters or servlets in the web application are initialized.
- Specified by:
contextInitialized
in interfacejakarta.servlet.ServletContextListener
- Parameters:
event
- the ServletContextEvent containing the ServletContext that is being initialized
-
contextDestroyed
public void contextDestroyed(jakarta.servlet.ServletContextEvent sce) Receives notification that the ServletContext is about to be shut down.All servlets and filters will have been destroyed before any ServletContextListeners are notified of context destruction.
- Specified by:
contextDestroyed
in interfacejakarta.servlet.ServletContextListener
- Parameters:
sce
- the ServletContextEvent containing the ServletContext that is being destroyed
-