I might be really dumb but i really couldn't figure out the following 2 questions:-
Ques 1:Given a
JSP page called mypage.jsp with the following code
<%
request.setAttribute("greeting","good");
%>
<jsp:include page="menu.jsp" />
morning
And an available file called menu.jsp that contains the following code
<%
String greeting = (String) request.getAttribute("greeting");
out.print(greeting);
%>What will happen when you attempt to compile and run mypage.jsp?
Choose one answer.
A. Compilation error the jsp:include tag takes a paramter of file not page
B. compilation and output of good only
C. compilation and output of good morning
D. compilation and output of greeting
E. compilation and output of greeting morning
F. compilation and output of greeting morning
Given answer is C.I am really lost on this one.
Ques 2:Is the following statement true or false?
A JSP document (i.e. in XML syntax) must start with the root tag
Answer: True
But as far as i know latest spec doesn't need a JSP document to start with root tag(acc. to Whizlabs)