Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Please answer me this question.  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
QUESTION 96
Place the startup steps in the order in which they are performed before a web application may start servicing client requests.

- Initialize filters defined in the web application deployment descriptor.
- Instantiate listeners defined in the web application deployment descriptor.
- Initialize Servlets to load on startup in the web application deployment descriptor.
- The contextinitialized method is called on listeners implementing Servlet ContextListener which have been instantiated.
 
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you deploy a webapp, the following steps happen in this order BEFORE any client request is processed :

  • Instantiate an instance of each event listener identified by a <listener> element in the deployment descriptor;
  • For listener instances that implement ServletContextListener, call the contextInitialized() method.
  • Instantiate an instance of each filter identified by a <filter> element in the deployment descriptor and call each filter instance�s init() method.
  • Instantiate an instance of each servlet identified by a <servlet> element that includes a <load-on-startup> element in the order defined by the load-onstartup element values, and call each servlet instance�s init() method.


  • This is something you should know for the exam. When you have this in mind, answer to your question is very clear :

    3 - Initialize filters defined in the web application deployment descriptor.
    1 - Instantiate listeners defined in the web application deployment descriptor.
    4 - Initialize Servlets to load on startup in the web application deployment descriptor.
    2 - The contextinitialized method is called on listeners implementing Servlet ContextListener which have been instantiated.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!