![]() |
JBridge: Certification Question Of The Day |
| JBridge Home >> Certification Questions >> Question for Monday May 19th 2003 | Monday May 19th 2003 |
|
Which of the following are listener interface methods which would potentially be triggered as a result of starting a web application containing the following servlet? (Consider that the servlet is configured to load on start up of the web application). (3 correct answers).
public class Filters extends HttpServlet {
public void init() throws ServletException {
ServletContext sc = this.getServletContext();
sc.setAttribute("MyAttribute", "MyAttributeValue");
sc.setAttribute("MyAttribute", "MyAttributeValue");
}
}
A ServletContextListener.contextInitialized(ServletContextEvent sce)
B ServletContextListener.contextStarted(ServletContextEvent sce)
C ServletContextListener.contextAdded(ServletContextEvent sce)
D ServletContextListener.applicationInitialized(ServletContextEvent sce)
E ServletContextAttributeListener.attributeInitialized(ServletContextAttributeEvent scae)
F ServletContextAttributeListener.attributeAdded(ServletContextAttributeEvent scae)
G ServletContextAttributeListener.attributeChanged(ServletContextAttributeEvent scae)
H ServletContextAttributeListener.attributeReplaced(ServletContextAttributeEvent scae)
Page down for the answer... The AnswerThe correct answers are A, F and H. The |
EMail: dbridgewater@jbridge.co.uk
Phone: +44 (0)1943 877414
Fax: +44 (0)1943 877414
Mail: David Bridgewater, Willow Dene, Bradford Road, Menston, Ilkley, West Yorkshire, LS29 6ED, UK
Copyright © 2003 David Bridgewater. All rights reserved.