Federico,


    You can import multiply packages.. The problem you are having is
java.sql.* and java.util.* both have Date() classes.  So you must specify
the fully qualified name. like  <%= new java.util.Date() %> or <%= new
java.sql.Date() %>

I hope this helps you out.

Omar Thomas


-----Original Message-----
From: Federico Delpino [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 21, 2000 9:35 AM
To: [EMAIL PROTECTED]
Subject: Hpw to import different packages


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

Reply via email to