At the top of you JSP page, specify which Date library you are using.  For
example,:

<%@ page import="java.util.Date" %>

specifies the Date class as defined in the java.util.Date package.  Note
that using

<%@ page import="java.util.*" %>

will not work IF you also have the sql import statement

<%@ page import="java.sql.*" %>

in the same jsp page, which I suspect you do by the error message you
received.

Hope this helps!

Celeste

-----Original Message-----
From: charu gupta [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 12:05 PM
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

Reply via email to