Package com.jk.web.mvc
Class MvcContextInitializer
java.lang.Object
com.jk.web.mvc.MvcContextInitializer
- All Implemented Interfaces:
jakarta.servlet.ServletContextListener
,EventListener
@WebListener
public class MvcContextInitializer
extends Object
implements jakarta.servlet.ServletContextListener
This class is a
ServletContextListener
that initializes the MVC
context.- 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 sce) Receives notification that the web application initialization process is starting.
-
Constructor Details
-
MvcContextInitializer
public MvcContextInitializer()
-
-
Method Details
-
contextInitialized
public void contextInitialized(jakarta.servlet.ServletContextEvent sce) 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:
sce
- 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
-