• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Final Mock exam question

 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFSJ 2nd edition question 6.
6) When creating session listeners which are true?
I thought option C - The DD tag used to declare them is <listener>.
is correct. But the book says its incorrect. Why is that?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Deepak Jain:
HFSJ 2nd edition question 6.


Hi, you can ask full question here.. that makes sense
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When creating session listeners which are true?
a) They are all declared in DD
b) Not all of them are declared in DD
c) The dd tag used is <listener>
d) The dd tag used is <session-listener>
e)The dd tag used to declared them must be placed within <web-app>
f)The dd tag used to declared them must be placed within <servlet>

Answer As per book: B E
According to me C is also correct. Because HttpSessionListner, HttpSessionAttributeListener & HttpSessionActivationListner must be declared in <listener/> tag and placed within <web-app>
Is this correct? If yes is the book wrong?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Deepak Jain:

c) The dd tag used is <listener>




yes , you are correct.

Actually the given answare is not clear.i guess it should be

The dd tag used to declared them must be <listener>
[ November 03, 2008: Message edited by: seetharaman venkatasamy ]
 
Rufus Addis
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Worth checking the Errata, there were in my opinion an unacceptably large number of errors in the mock exam for the 2nd edition - corrected in later prints:

http://oreilly.com/catalog/9780596516680/errata/9780596516680.0708

This I found demoralising when sitting the mock, but Question 6 is in the errata!

Rufus.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic