What is ServletRequestAttributeEvent?
ServletRequestAttributeEvent class gives notifications about changes to the attributes of ServletRequest in an application.
This class listens to the notifications and performs some important tasks whenever there is any change to the request attribute.
Some Important Methods of ServletRequestAttributeListener
Methods | Description |
void attributeAdded(ServletRequestAttributeEvent e) | notification that a new attribute was added to the servlet request. |
void attributeRemoved(ServletRequestAttributeEvent e) | notification that an existing attribute was removed from the servlet request. |
void attributeReplaced(ServletRequestAttributeEvent e) | notification that an attribute was replaced on the servlet request |
What is ServletContextAttributeEvent?
ServletContextAttributeEvent class let's you know if an attribute in a web application context has been added, removed or replaced.
Implementation of ServletContextAttributeListener interface, receive notifications of changes to the attribute list on the servlet context of a web application.
Some Important Methods of ServletContextAttributeListener
Methods | Description |
void attributeAdded(ServletContextAttributeEvent e) | notification that a new attribute was added to the context. |
void attributeRemoved(ServletContextAttributeEvent e) | notification that an existing attribute was removed from the context. |
void attributeReplaced(ServletContextAttributeEvent e) | notification that an attribute was replaced on the context |