Handling html date input with Java

I am trying to just send a date via a html form to a servlet, then send the date back to a jsp and display the date. I'm unsure of how to handle the date sent from the form. It seems to be an object, I tried casting it to a String but that returns null. I tried using the toString method of the date object but that did not work etiher.

java.sql.Date date = (java.sql.Date) request.getAttribute("date");

request.setAttribute("date", date.toString());

request.getRequestDispatcher("/results.jsp").forward(request, response);

I want to do something like that, I need the date in sql...

Read More »

By: StackOverFlow - Tuesday, 20 November

Related Posts