Class StrutsListener

java.lang.Object
org.apache.struts2.dispatcher.listener.StrutsListener
All Implemented Interfaces:
jakarta.servlet.ServletContextListener, EventListener

public class StrutsListener extends Object implements jakarta.servlet.ServletContextListener
Servlet listener for Struts. The preferred way to use Struts is as a filter via the StrutsPrepareAndExecuteFilter and its variants. This might be useful if Struts config information is needed from other servlet listeners, like Sitemesh or OSGi
  • Constructor Details

    • StrutsListener

      public StrutsListener()
  • Method Details

    • contextInitialized

      public void contextInitialized(jakarta.servlet.ServletContextEvent sce)
      Specified by:
      contextInitialized in interface jakarta.servlet.ServletContextListener
    • contextDestroyed

      public void contextDestroyed(jakarta.servlet.ServletContextEvent sce)
      Specified by:
      contextDestroyed in interface jakarta.servlet.ServletContextListener