I've had this time for about quite sometime now and i've run out of resources for research.
In my servlet, i have this code:
comment.setDateadded(Date.valueOf(request.getParameter("date")));
The code basically gets data from a JSP page then is set as one of the object's values.
The problem is:
When the servlet is called and run returns this error:
WARNING: StandardWrapperValve[add_comment]: PWC1406: Servlet.service() for servlet add_comment threw exception
java.lang.IllegalArgumentException
at java.sql.Date.valueOf(Date.java:117)
at Controller.Leader.add_comment.processRequest(add_comment.java:50)
at Controller.Leader.add_comment.doPost(add_comment.java:96)
What i've tried: I'm not sure what the problem is anymore. I imported
import java.sql.Date;
in the servlet ofor the line to work. I've also tried manually putting in the date instead of putting automatically the current date but it still does not work. Ive tried yyyy/mm/dd format and the yyyy-mm-dd but it still wont work.
For those who will comment, thank you very much! If you need more details, please post.