Home » Oracle » 1z0-899 » When using the @WebListener annotation, the class on which the annotation is applied to must also implement at least one o the following interfaces – (Choose two):
When using the @WebListener annotation, the class on which the annotation is applied to must also implement at least one o the following interfaces – (Choose two):
A. RequestListener
B. AttributeListener
C. ServletContextListener
D. HttpSessionListener
E. SessionAttributeListener
F. AsyncListener
Correct Answer: CD
Explanation/Reference:
@WebListener
The main task of the listener is to listen the particular events and process your own task on that event. For example, if you want to initialize a database connection before your application starts, ServletContextListener will be implemented to do that. Another good example is -when you want to do some task on the creation and destruction of a session. For this purpose you need to implement HttpSessionListener.
Download Printable PDF. VALID exam to help you PASS.
|
|
C and D