title: Date cannot be resolved to a type
body: <p>I am learning debugging and I am getting the following error when running tomcat through my browser. I am using Texpad to write and I guess tomcat after. </p>
  
  <pre><code>An error occurred at line: 18 in the jsp file: /Debug.jsp
  Date cannot be resolved to a type
  15: 
  16: &lt;%
  17:     response.setContentType("MIME");
  18:     Date today = new Date(12,20,2004);
  19: 
  20:     Date created = new Date(session.getCreationTime());
  21:     Date lastAccessed = new Date(session.getLastAccessedTime());
  </code></pre>
  
  <p>I am getting the same error twice for lines 18, 20, and 21. The original code is below.</p>
  
  <pre><code>&lt;HTML&gt;
  &lt;HEAD&gt;
  &lt;TITLE&gt;JSP Debugging&lt;/TITLE&gt;
  &lt;/HEAD&gt;
  
  &lt;BODY&gt;
  &lt;% import java.io.*; %&gt;
  &lt;% import java.util.Date; %&gt;
  &lt;% import java.util.Enumeration; %&gt;
  
  &lt;%
      response.setContentType("MIME");
      Date today = new Date(12,20,2004);
  
      Date created = new Date(session.getCreationTime());
      Date lastAccessed = new Date(session.getLastAccessedTime());
  
      out.print("&lt;h1&gt;Today is " );
      out.print(today); 
      out.print("&lt;/h1&gt;" );
      out.print("This session has the following characteristics:&lt;br&gt;" );
      out.println("&lt;br&gt;ID: ");
      session.getId(); %&gt;
      out.println("Created: " + created);
      out.println("Last Accessed: " + lastAccessed);
      out.println("&lt;br&gt;Max Inactive Interval: " +
                      session.getMaxInactiveInterval());
  %&gt;
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>
  
  <p>I know there are many more errors and I am working on those but for now any help on this would be amazing. As far as I could tell it is an issue with Date but I am not sure what exactly.</p>
  
  <p>EDIT-------------------------------------------------------------------------------------------------</p>
  
  <p>So I made the changes requested and the code now looks like the following:</p>
  
  <pre><code>&lt;HTML&gt;
  &lt;HEAD&gt;
  &lt;TITLE&gt;JSP Debugging&lt;/TITLE&gt;
  &lt;/HEAD&gt;
  
  &lt;BODY&gt;
  &lt;%@ page import="java.util.Date,java.io.*,java.util.Enumeration"%&gt;
  
  &lt;%
      response.setContentType("MIME");
      Date today = new Date(12,20,2004);
  
      Date created = new Date(session.getCreationTime());
      Date lastAccessed = new Date(session.getLastAccessedTime());
  
      out.print("&lt;h1&gt;Today is " );
      out.print(today); 
      out.print("&lt;/h1&gt;" );
      out.print("This session has the following characteristics:&lt;br&gt;" );
      out.println("&lt;br&gt;ID: ");
      session.getId(); %&gt;
      out.println("Created: " + created);
      out.println("Last Accessed: " + lastAccessed);
      out.println("&lt;br&gt;Max Inactive Interval: " +
                      session.getMaxInactiveInterval());
  %&gt;
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>
  
  <p>And after I ran localhost:8080/Debug.jsp in my web browser it downloaded a new copy of the jsp with the expected results but they were supposed to be displayed in the browser.</p>
  
  <pre><code>&lt;HTML&gt;
  &lt;HEAD&gt;
  &lt;TITLE&gt;JSP Debugging&lt;/TITLE&gt;
  &lt;/HEAD&gt;
  
  &lt;BODY&gt;
  
  
  &lt;h1&gt;Today is Tue Feb 25 00:00:00 EST 1919&lt;/h1&gt;This session has the following characteristics:&lt;br&gt;&lt;br&gt;ID: 
  
      out.println("Created: " + created);
      out.println("Last Accessed: " + lastAccessed);
      out.println("&lt;br&gt;Max Inactive Interval: " +
                      session.getMaxInactiveInterval());
  %&gt;
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>