Monday, July 9, 2018

ServletContextAttributeEvent and ServletContextAttributeListener

Constructor of ServletContextAttributeEvent Class
  1. public ServletContextAttributeEvent(ServletContext source, java.lang.String name,java.lang.Object value): Construct a ServletContextAttributeEvent from the given context for the given attribute name and attribute value.
Methods of ServletContextAttributeEvent Class
  1. public java.lang.String getName(): Return the name of the attribute that changed on the ServletContext.
  2. public java.lang.Object getValue(): Returns the value of the attribute that has been added, removed, or replaced.
Methods of  ServletContextAttributeListener interface
  1. void attributeAdded(ServletContextAttributeEvent event): Receives notification that an attribute has been added to the ServletContext.
  2. void attributeRemoved(ServletContextAttributeEvent event): Receives notification that an attribute has been removed from the ServletContext.
  3. void attributeReplaced(ServletContextAttributeEvent event): Receives notification that an attribute has been replaced from the ServletContext.

No comments:

Post a Comment