ServletContextAttributeListener (Servlet 3.1 API Documentation - Apache Tomcat 8.5.56)

javax.servlet

## Interface ServletContextAttributeListener

- All Superinterfaces:
    java.util.EventListener

      public interface ServletContextAttributeListener
      extends java.util.EventListener

  Implementations of this interface receive notifications of changes to the attribute list on the servlet context of a web application. To receive notification events, the implementation class must be configured in the deployment descriptor for the web application.
  Since:
    v 2.3
  See Also:
    `ServletContextAttributeEvent`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `attributeAdded(ServletContextAttributeEvent scae)` Notification that a new attribute was added to the servlet context.
    `void` | `attributeRemoved(ServletContextAttributeEvent scae)` Notification that an existing attribute has been removed from the servlet context.
    `void` | `attributeReplaced(ServletContextAttributeEvent scae)` Notification that an attribute on the servlet context has been replaced.

- - ### Method Detail

    - #### attributeAdded

          void attributeAdded(ServletContextAttributeEvent scae)

      Notification that a new attribute was added to the servlet context. Called after the attribute is added.
      Parameters:
        `scae` - Information about the new attribute

    - #### attributeRemoved

          void attributeRemoved(ServletContextAttributeEvent scae)

      Notification that an existing attribute has been removed from the servlet context. Called after the attribute is removed.
      Parameters:
        `scae` - Information about the removed attribute

    - #### attributeReplaced

          void attributeReplaced(ServletContextAttributeEvent scae)

      Notification that an attribute on the servlet context has been replaced. Called after the attribute is replaced.
      Parameters:
        `scae` - Information about the replaced attribute

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.