• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in mock question's explanation

 
Siddharth Purandare
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good answers are 3 and 4 imho

That comment about answer 5 is weird.
 
Siddharth Purandare
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic