• Post Reply Bookmark Topic Watch Topic
  • New Topic

include page and include file

 
muthu moorthy
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody help to understand & finding the answer for the following Q
Thank you

The JSP page index.jsp contains the line:

<jsp:include page="main.jsp" />

The JSP page main.jsp contains the line:

<%@ include file="copyright.jsp" %>

Assume that all files exist in the same directory. Which two are true when a
browser makes a request for the page index.jsp? (Choose two.)

A The compilation of the page main.jsp will fail.
B The translation of the page index.jsp will fail.
C The page main.jsp is executed and its output is included in the output from index.jsp.
D The page copyright.jsp is executed and its output is included in the
output from main.jsp.
E If the page index.jsp has not been compiled, it is translated and the
contents of the page main.jsp are included at translation time.
F If the page main.jsp has not been compiled, it is translated and the
contents of the page copyright .jsp are included at translation time.
 
Jesus Angeles
Ranch Hand
Posts: 2069
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
c f

A The compilation of the page main.jsp will fail.
>>>>>not enough info to conclude. contents of jsp are not given.
B The translation of the page index.jsp will fail.
>>>>>not enough info to conclude. contents of jsp are not given.
C The page main.jsp is executed and its output is included in the output from index.jsp.
>>>>>true, dynamically included
D The page copyright.jsp is executed and its output is included in the
output from main.jsp.
>>>>>false, copyright is static include, included as is, not executed
E If the page index.jsp has not been compiled, it is translated and the
contents of the page main.jsp are included at translation time.
>>>>>false,main.jsp is included runtime/dynamic
F If the page main.jsp has not been compiled, it is translated and the
contents of the page copyright .jsp are included at translation time
>>>>>true,the page copyright .jsp are included at translation time/static
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!