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???