Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

EPractice Lab mock exam 4 question 50

 
Ranch Foreman
Posts: 1898
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Which of the following statements are true about servlet 3.0?
a. listeners are invoked in a random order.
b. the order in which listeners are invoked can be defined.
c. order can be specified in web.xml or annotation
Given answer: b, c
Prior to this release of the specification, listeners were invoked in a random order. As of servlet 3.0, the order in which listeners are invoked can be defined.


I think the answers should be a , b.
For a, if the listeners are specified by annotation, the order is not specified.


Chapter 8.2.3 of Servlet 3.0, when using annotations to define the listeners, servlets and filters, the order in which they are invoked is unspecified.


For b, the order of the listeners are defined in web.xml.
For c, order cannot be specified by annotation.
So, c is incorrect.
 
Creator of Enthuware JWS+ V6
Posts: 3343
303
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bad question.

C is definitely incorrect, and B is correct. A is only correct if annotations are used; in this problem statement we are not sure so we can't give a correct answer.
 
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic