Multiple choice technology programming languages

Given the following to JSP files select the right answers. <%@ include file=”included.jsp” %> <%@ page errorPage=”OneErrorPage.jsp” %> ////////// different file <%@ page errorPage=”AnotherErrorPage.jsp” %> Hello

  1. 1) File container.jsp will compile if the directive page comes before the directive include

  2. 2) File container will compile and when executed it will show:”Hello”.

  3. 3) File container.jsp will compile if the errorPage in container.jsp is the same as in file included.jsp.

  4. 4) File container.jsp will compile if instead of directive include (<%@ include ...%>) it is used the action include (<jsp:include...>)

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The static include directive (<%@ include %>) inserts the source code of included.jsp into container.jsp at compile-time, creating a single servlet. This causes a conflict because the generated code would have both errorPage="OneErrorPage.jsp" and errorPage="AnotherErrorPage.jsp" - duplicate page directives are illegal. The dynamic include action () executes at runtime as separate components, each with their own errorPage setting, avoiding this conflict.