Java 当从jsp页面向servlet传递日期而不是传递建议的日期时,sysdate正在传递

Java 当从jsp页面向servlet传递日期而不是传递建议的日期时,sysdate正在传递,java,jsp,date,servlets,Java,Jsp,Date,Servlets,我使用了日期选择器来选择日期格式。 现在,当将这个日期从jsp页面传递到servlet页面而不是传递我输入的日期时,sysdate正在传递 这些是一些系统输出 In Book Support In Database Connection Driver is still loading... Driver Loaded..... Connection established..... 2013-10-28 support_id=0, booking_date=2013-10-28, des

我使用了日期选择器来选择日期格式。 现在,当将这个日期从jsp页面传递到servlet页面而不是传递我输入的日期时,sysdate正在传递



这些是一些系统输出

In Book Support
In Database Connection
Driver is still loading...
Driver Loaded.....
Connection established.....
2013-10-28
 support_id=0, booking_date=2013-10-28, descriprtion=asdasd, address=sadas, contact_number=234]
In Add Support
 support_id=0, booking_date=2013-10-28, descriprtion=asdasd, address=sadas, contact_number=234]
1record added
您创建了新的日历实例,因此结果

使用
SimpleDateFormat
将收到的
String
解析为
Date
并使用它创建更多的
Date
实例(如果需要)

使用SimpleDateFormat ti解析收到的字符串到Date并使用它创建更多的日期实例(如果需要)
In Book Support
In Database Connection
Driver is still loading...
Driver Loaded.....
Connection established.....
2013-10-28
 support_id=0, booking_date=2013-10-28, descriprtion=asdasd, address=sadas, contact_number=234]
In Add Support
 support_id=0, booking_date=2013-10-28, descriprtion=asdasd, address=sadas, contact_number=234]
1record added
Calendar cal = Calendar.getInstance();
java.sql.Date sD=new java.sql.Date(cal.getTimeInMillis());
System.out.println(sD);