here is the question in a mock:
Given the following to
JSP files select the right answers.
<!-- file container.jsp -->
<html><body>
<%@ include file=�included.jsp� %>
<%@ page errorPage=�OneErrorPage.jsp� %>
</body></htm>
////////// different file
<!-- file included.jsp -->
<html><body>
<%@ page errorPage=�AnotherErrorPage.jsp� %>
<i>Hello</i>
</body></html>
1) File container.jsp will compile if the directive page comes before the directive include
2) File container will compile and when executed it will show:�Hello�.
3) File container.jsp will compile if the errorPage in container.jsp is the same as in file included.jsp.
4) File container.jsp will compile if instead of directive include (<%@ include ...%>
it is used the action include
here is the answer:
) File container.jsp will compile if instead of directive include (<%@ include ...%>
it is used the action include (<jsp:include ...>
explanation:
With directive include (<%@ include file=�fileName� %>
the file is literaly included before compilation.In this case we have then, two lines with directive page both with attribute errorPage.That's an error. Then only attribute of directive page that can occur more than once is import.
i use resin2.02 as the web server,and i can compile the file which mentioned above and no error occurs.why? i don't find any difference bewteen <jsp:inclde...and <%@include....
who can explain it for me?