This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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.
     
    Something must be done about this. Let's start by reading this tiny ad:
    Programmatically Create PDF Using Free Spire.PDF with Java
    https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!