Charu: "Date startdate=Date();" is incorrect
You have to instantiate using the "new" operator Date startdate = new Date(); Also, be sure you import the right package java.sql or java.util Hope this helps. Sagar -----Original Message----- From: charu gupta [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 11:05 AM To: [EMAIL PROTECTED] Subject: Date() giving problems in jsp Hi all, In my jsp page I am passing "date" as a parameter. The code is as follows:- Date startdate=Date(); if(request.getParameter("date")!=null) { startdate=request.getParameter("date"); } I am getting the following error message on compilation:- D:\bea\wlserver6.0\config\EAIDOMAIN\applications\emd\WEB-INF\_tmp_war_EAI1_E AI1_EMD\jsp_servlet\_test2.java:169: reference to Date is ambiguous, both class java.sql.Date in java.sql and class java.util.Date in java.util match Date startdate= new java.util.Date(); //[ /test2.jsp; Line: 10] Please help! Thanks __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
