Monday, July 9, 2018

ServletRequestAttributeEvent and ServletRequestAttributeListener

Constructor of ServletRequestAttributeEvent 
  1. public ServletRequestAttributeEvent(ServletContext sc, ServletRequest request, java.lang.String name, java.lang.Object value)

Parameters:
    sc - the ServletContext that is sending the event.
    request - the ServletRequest that is sending the event.
    name - the name of the request attribute.
    value - the value of the request attribute.

Methods of ServletRequestAttributeEvent
  1. public java.lang.String getName(): Return the name of the attribute that changed on the ServletRequest. 
  2. public java.lang.Object getValue(): Returns the value of the attribute that has been added, removed or replaced.
Methods of ServletRequestAttributeListener
  1. void attributeAdded(ServletRequestAttributeEvent srae): Receives notification that an attribute has been added to the ServletRequest.
  2. void attributeRemoved(ServletRequestAttributeEvent srae): Receives notification that an attribute has been removed from the ServletRequest.
  3. void attributeReplaced(ServletRequestAttributeEvent srae): Receives notification that an attribute has been replaced on the ServletRequest.

No comments:

Post a Comment