Oracle
1Z0-899 · Question #181
Your web application requires the adding and deleting of many session attributes during a complex use case. A bug report has come in that indicates that an important session attribute is being…
The correct answer is B. Create an HttpSessionAttributeListener class and implement the attributeRemoved method and log the. See the full explanation below for the reasoning.
Question
Your web application requires the adding and deleting of many session attributes during a complex use case. A bug report has come in that indicates that an important session attribute is being 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 so you can track down when the attribute is erroneously being deleted. Which listener class will accomplish this debugging goal?
Options
- ACreate an HttpSessionAttributeListener class and implement the attributeDeleted method and log the
- BCreate an HttpSessionAttributeListener class and implement the attributeRemoved method and log the
- CCreate an SessionAttributeListener class and implement the attributeRemoved method and log the
- DCreate an SessionAttributeListener class and implement the attributeDeleted method and log the
How the community answered
(38 responses)- A11% (4)
- B82% (31)
- C3% (1)
- D5% (2)
Community Discussion
No community discussion yet for this question.