单选题Your web application requires the adding and deleting of many session attributes during a complex usecase. A bug report has come in that indicates that an important session attribute is being deleted too soonand a NullPointerException is being thrown s

题目
单选题
Your web application requires the adding and deleting of many session attributes during a complex usecase. A bug report has come in that indicates that an important session attribute is being deleted too soonand a NullPointerException is being thrown several interactions after the fact. You have decided to create asession event listener that will log when attributes are being deleted so you can track down when theattribute is erroneously being deleted. Which listener class will accomplish this debugging goal?()
A

Create an HttpSessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getName method on the event object.

B

Create an HttpSessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getName method on the event object.

C

Create an SessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getAttributeName method on the event object.

D

Create an SessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getAttributeName method on the event object.

参考答案和解析
正确答案: A
解析: 暂无解析
更多“单选题Your web application requires the adding and deleting of many session attributes during a complex usecase. A bug report has come in that indicates that an important session attribute is being deleted too soonand a NullPointerException is being thrown s”相关问题