Multiple choice technology web technology

Given: <%-- insert code here --%> Today is: <%= new Date() %> What needs to go on line 1?

  1. <%@ page import='java.util.Date' %>

  2. <%@ import class='java.util.Date' %>

  3. <%@ include file='java.util.Date' %>

  4. <%@ include class='java.util.Date' %>

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

JSP pages using Java classes need the page directive with import attribute. The syntax is <%@ page import='java.util.Date' %>. Option B incorrectly uses 'class' instead of 'page' and 'import' as the directive name. Options C and D use include directive (for including files at translation time), not for importing classes.