File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt in mock question's explanation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt in mock question Watch "Doubt in mock question New topic

Doubt in mock question's explanation

Siddharth Purandare
Ranch Hand

Joined: Nov 13, 2006
Posts: 101
Hi Guys,

I found this question in the J2EE Certificate mock exam.

Which of the following statements correctly declares an element that allows the output result of a specified resource to be inserted in a JSP page? [Check all correct answers]

1. <jsp:include file="disclaimer.html" />
2. <jsp:forward page="disclaimer.html" flush="true" />
3. <jsp:include page="disclaimer.html" flush="true" />
4. <%@ include file="disclaimer.html" %>
5. <jsp:forward page="disclaimer.html" /

The Correct Answer are 3 and 5. 3 is fine with me No Issues BUT description for option 5 says:

The jsp:forward action also includes the output generated from the resource specified by the page attribute into the including JSP. However, jsp:forward terminates the execution of the current page whereas the jsp:include action resumes processing in the calling JSP page, once the inclusion is completed.

It doesn't satisfies me. Can somebody comment whether the description is satisfactory? (For option 5)

Siddharth Purandare<br />SCJP 1.4 - 76%<br />SCWCD 1.4 - 85%<br /> <br />It is the "attitude" and not the "aptitude" which determines "altitude".
Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 549

Good answers are 3 and 4 imho

That comment about answer 5 is weird.

SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
Siddharth Purandare
Ranch Hand

Joined: Nov 13, 2006
Posts: 101
Thanks Cilinio,

But Answer 4 is incorrect because the include directive only substitutes the text of the specified resource into the including JSP page.

And we want the output result of the included page. Read the question again. Thanks for showing interest. I am still confused about the option 5 YES its really Wierd.....

BTW whats imho??
[ December 09, 2006: Message edited by: Siddharth Purandare ]
I agree. Here's the link:
subject: Doubt in mock question's explanation
It's not a secret anymore!