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 Doubts/errata in HFSJ final mock exam? 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 "Doubts/errata in HFSJ final mock exam?" Watch "Doubts/errata in HFSJ final mock exam?" New topic
Author

Doubts/errata in HFSJ final mock exam?

H Pathak
Greenhorn

Joined: Dec 20, 2006
Posts: 28
I have the following doubts about the HFSJ final mock exam:

Question 12: In this question, the tld specifies body-content as empty, but the tag handler class extends TagSupport, and in its doStartTag, it returns SKIP_BODY or EVAL_BODY_INCLUDE based on an if condition. My doubt is that even if it compiles fine, shouldn't it throw translation error, as we cannot return EVAL_BODY_INCLUDE if the body-content is defined as empty?

Question 22: This question asks which JSP code would you use to include static content in a JSP; this marks jsp:include standard action as a correct answer, but gives RequestDispatcher.include() as wrong answer. My doubt is that if jsp:include is correct, why is RequestDispatcher.include() wrong?

Question 40: This question says that the following statement is true: "The web container calls the servlet's destroy() method when the servlet is destroyed or unloaded." My doubt is that destroy() method is called BEFORE the servlet is destroyed, not when (just after)

Question 63: In this question, it says that line 4 (jsp:setProperty) will not generate an error... but my doubt is that before jsp:setProperty, we are not having any jsp:useBean declaration... so shouldn't it generate an error???


SCJP 1.4 - cleared<br />SCWCD 1.4 - cleared!!
madhav changala
Ranch Hand

Joined: Dec 20, 2005
Posts: 57
If you give the questions also .. then it would be easy for any of them .. to answer you..

Regards
Madhav


saivenumadhav
Rishi Chopra
Ranch Hand

Joined: Mar 07, 2004
Posts: 108
Question 12 It should give runtime error when you try running the jsp page but oh they have not even mentioned that as an option.

Question 22 : It is weird since RequestDispatcher option also seems to be true but what i can make out max from it is it should be inside the scriptlet to make it a valid option (i know this seems stupid but thats the max i can think on it)

Question 40 : destroy() method is called just before the servlet is destroyed .your are right on it i guess.

Question 63 : you are again right on it ...i tried it it gave error.

Hope i cleared things up.
Regards
Rishi Chopra


Life is Beautiful Learn to See it.........
H Pathak
Greenhorn

Joined: Dec 20, 2006
Posts: 28
Thanks a lot Rishi (I was too lazy to type the questions )

But I agree with you on the RequestDispatcher question (no. 22), because that code is servlet, not JSP (it is not inside a scriptlet)

But the rest of the questions (or rather, the answers given) are still confusing for me...
Bert Meijers
Greenhorn

Joined: Feb 06, 2011
Posts: 15
Thanks to all,

Just encountered number 63, got me a bit angry.
Relief that I was right in my understanding that first a bean has to be instantiated before any value can be set.
(or setProperty in the body of useBean...)

Thanks ALL!

Greetz
Bert
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubts/errata in HFSJ final mock exam?