HFSJ p. 430 question 12
QUESTION:
How would you include dynamic content in a
JSP, similar to a server-side include (SSI)? (Choose all that apply)
A. <%@ include file="/segments/footer.jspf" %>
B. <jsp:forward page="/segments/footer.jspf"/>
C. <jsp:include page="/segments/footer.jspf"/> D. RequestDispatcher dispatcher = request.getRequestDispatcher("/segments/footer.jspf"); dispatcher.include(request, response);
D (wrong): Option D would be correct if it was a scriplet: it functionality does the same thing as option C, but its syntax is only used in
servlets.
Does it mean that the only reason why option D isn't correct is that there're no <% %> around this code?..