• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Startup order Question

 
tiim fei
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A.initialize filters defined in the web app dd.
B.instantiate listeners defined in the web dd
C.Initialize Servlets to load startup in the web app dd
D.The contextInitialized method is called on listeners implementing Servlet ContextListener which have been instantiated.

The given answer is C D B A
But I don't understand why. For example , if the D is before B , how that listener could be created ?
Any body give me a clue to this ?
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What is the question. If the reverse order the sequence is correct.

Thanks
 
tiim fei
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is a drag and drop , so I only write the choice and answer in text.

Can you explain why the reverse order is right , where the spec saying this ? Thank you
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think I was wrong. The specs in contextInitialized method says that Notification that the web application initialization process is starting. All ServletContextListeners are notified of context initialisation before any filter or servlet in the web application is initialized.

thanks
 
Vengan Krish
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I got the same question in some mock exam and the answer given was A D B C.

Regards
 
tiim fei
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what is the answer ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic