the problem is that the Date class is defined in both sql package and
util package, so the program doesn't know which Date class to call,
either the one from sql package or the util package.
peter choe
Federico Delpino wrote:
>
> Hi people,
> I have to import in my jsp page the packages
> java.util.* and java.sql.*
> I try with a code like this:
> -------------------------------------------------------
> <%@ page import="java.sql.*" %>
> <%@ page import="java.util.*" %>
>
> The current date is <%= new Date()%>
> --------------------------------------------------------
> Calling the page I get the error:
> ...... Ambiguous class: java.sql.Date and java.util.Date
>
> Then the question:
> It is legal to import more than one pagkage at time?
> And, if so, how do that?
> Thanks again
> federico delpino
>
> ------------------------------------------------------------------
> Federico Delpino Tel. 39-51-20-95722
> Osservatorio Astronomico di Bologna Fax. 39-51-20-95700
> via Ranzani,1 - 40126 Bologna, Italy e-mail: [EMAIL PROTECTED]
>
> ===========================================================================
> 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://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
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://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets