So I currently have a registration.html page that holds two dates in a drop down list.
<td>Preferred Date:</td>
<td><select name="datePreferred">
<option value="dateOne">08/18/2012</option>
<option value="dateTwo">08/25/2012</option>
</select>
</td>
For my JSP page I have the following
<%
String dPreferred = request.getParameter("datePreferred");
SimpleDateFormat dateFormat = new SimpleDateFormat("mm/dd/yyyy");
Date dateObj = dateFormat.parse(dPreferred);
%>
However I seem to be getting “Cannot find symbol – symbol: class Date – location: class SimplifiedJSPServlet
What I am trying to do is create and store a date object that can be written to a text file and also displayed on a verification page.
Any ideas would be greatly appreciated :).
Have you imported Date in your JSP?: