SCWCD : Servlet event listeners Mock Exam Practice Questions
Questions no -1
Implementations of the ________ interface are notified of changes to the list of active sessions in a web application.
options
A)HttpSessionListener
B)HttpSessionAttributeListener
C)HttpRequestListener
D)HttpContextListener
Correct answer is : A
Explanations :Implementations of the HttpSessionListener interface are notified of changes to the list of active sessions in a web application.
Questions no -2
All ____________ are notified of context initialization before any filter or servlet in the web application is initialized.
options
A)ServletContextListeners
B)HttpSessionListener
C)ServletRequestListener
D)All of the above
Correct answer is : A
Explanations : All ServletContextListeners are notified of context initialization before any filter or servlet in the web application is initialized.
All servlets and filters have been destroyed before any ServletContextListeners are notified of context destruction.
|