Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package br.ufc.mandacarau;
- import jakarta.servlet.ServletContextEvent;
- import jakarta.servlet.ServletContextListener;
- import jakarta.servlet.ServletRequestEvent;
- import jakarta.servlet.ServletRequestListener;
- import jakarta.servlet.http.HttpSessionEvent;
- import jakarta.servlet.http.HttpSessionListener;
- /**
- * Application Lifecycle Listener implementation class HelloListener
- *
- */
- public class HelloListener implements ServletContextListener, HttpSessionListener, ServletRequestListener {
- /**
- * Default constructor.
- */
- public HelloListener() {
- // TODO Auto-generated constructor stub
- }
- /**
- * @see HttpSessionListener#sessionCreated(HttpSessionEvent)
- */
- public void sessionCreated(HttpSessionEvent se) {
- System.out.println("sessionCreated");
- }
- /**
- * @see HttpSessionListener#sessionDestroyed(HttpSessionEvent)
- */
- public void sessionDestroyed(HttpSessionEvent se) {
- System.out.println("sessionDestroyed");
- }
- /**
- * @see ServletContextListener#contextInitialized(ServletContextEvent)
- */
- public void contextInitialized(ServletContextEvent sce) {
- System.out.println("contextInitialized");
- }
- /**
- * @see ServletContextListener#contextDestroyed(ServletContextEvent)
- */
- public void contextDestroyed(ServletContextEvent sce) {
- System.out.println("contextDestroyed");
- }
- /**
- * @see ServletRequestListener#requestInitialized(ServletRequestEvent)
- */
- public void requestInitialized(ServletRequestEvent sre) {
- System.out.println("requestInitialized");
- }
- /**
- * @see ServletRequestListener#requestDestroyed(ServletRequestEvent)
- */
- public void requestDestroyed(ServletRequestEvent sre) {
- System.out.println("requestDestroyed");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement