File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Final Mock exam question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Final Mock exam question" Watch "Final Mock exam question" New topic
Author

Final Mock exam question

Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
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?


SCJP, SCWCD, SCBCD
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by Deepak Jain:
HFSJ 2nd edition question 6.


Hi, you can ask full question here.. that makes sense
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
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

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Aug 21, 2008
Posts: 83
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Final Mock exam question