問題詳情

51 Your web application requires the adding and deleting of many session attributes during acomplex use case. A bug report has come in that indicates that an important session attribute isbeing deleted too soon and a NullPointerException is being thrown several interactions after the fact.You have decided to create a session event listener that will log when attributes are being deleted soyou can track down when the attribute is erroneously being deleted.Which listener class will accomplish this debugging goal?
(A) Create an HttpSessionAttributeListener class and implement the attributeDeleted method and logthe attribute name using the getName method on the event object.
(B) Create an HttpSessionAttributeListener class and implement the attributeRemoved method andlog the attribute name using the getName method on the event object.
(C) Create an SessionAttributeListener class and implement the attributeRemoved method and log theattribute name using the getAttributeName method on the event object.
(D) Create an SessionAttributeListener class and implement the attributeDeleted method and log theattribute name using the getAttributeName method on the event object.

參考答案

無參考答案

內容推薦