kya yaar, how's it that u r using the same variable
name "mydate" twice. u wanna get ur funda clear first.
Also, note following point carefully:
DATE ===> A CLASS IN JAVA.UTIL AND ALSO JAVA.SQL.
since u imported both packages, it can cause
ambiguity.
suppose u want to create a date instance say "date1",
it must be using either 1 or 2 below:
(I AINT CONSIDERING THE DATE-CONSTRUCTOR'S PARAMETERS
GIVEN AS "..." AS MAIN IDEA IS "GIVE ENTIRE PKG. NAME)
1> java.sql.date date1 = new java.sql.date(...);
2> java.util.date date1 = new java.util.date(...);
--- Ravi Shankar Jagarapu <[EMAIL PROTECTED]>
wrote:
> Hi,
> I have a deadline of Monday to submit, so any help
> would be appreciated.
>
> I am trying to retrieve and store data into Oracle
> objects using servlets.
>
> I am getting a error at the following place.
> Object obj = design_info_attrs[0];
> Date myDate = (Date) obj;
> out.print( myDate.toString() + "</a>" );
>
> Date myDate = (Date) design_info_attrs[0];
> out.print( myDate.toString() );
>
>
> ModelNoInfo.java:269: Class Date not found in type
> declaration.
> Date myDate = (Date) obj;
> ^
> ModelNoInfo.java:269: Class Date not found in type
> declaration.
> Date myDate = (Date) obj;
> ^
> ModelNoInfo.java:276: Class Date not found in type
> declaration.
> Date myDate = (Date) design_info_attrs[0];
> ^
> ModelNoInfo.java:276: Class Date not found in type
> declaration.
> Date myDate = (Date) design_info_attrs[0];
>
>
> Now I have imported the following classes:
> import java.io.*;
> import java.sql.*;
> import oracle.sql.*;
> import java.util.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> I am unable to understand why I am getting
> such error? Is not the Date Object provided in
> various
> versions of JDK API? Is there an alternative code I
> could write? Please give me an example.
>
> I would appreciate If you can send some sample code
> with these objects.
> Also
> tell me how the error could be solved.
>
> Thanks,
> Ravi.
>
> __________________________________________________
> Do You Yahoo!?
> Spot the hottest trends in music, movies, and more.
> http://buzz.yahoo.com/
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html
__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html