Package org.apache.struts2.dispatcher.listener

# 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 Summary

  Constructors
  Constructor
  Description
  `StrutsListener()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `contextDestroyed(jakarta.servlet.ServletContextEvent sce)`
  `void`
  `contextInitialized(jakarta.servlet.ServletContextEvent sce)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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`