already there is a lottttttttt of answers in this forum for this simple
question can we make this thread die, as one of the members noted earlier
please send a private mesg to him/her who send this question, not to the entire
list, when these kind of basic questions asked!!!!!.
Antonio Villafana wrote:
> Try 'Class.forName (oracle.jdbc.driver.OracleDriver);'
> instead of 'Class t = Class.forName (oracle.jdbc.driver.OracleDriver);'
>
> *Antonio*
>
> ----- Original Message -----
> From: Ari Kukkonen <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, October 01, 1999 9:00 AM
> Subject: Type expected
>
> > Could somebody tell me what is wrong with this servlet:
> >
> > import java.sql.*;
> > import java.io.*;
> > import java.util.*;
> > import javax.servlet.*;
> > import javax.servlet.http.*;
> >
> > public class SimpleServlet extends HttpServlet
> > {
> > static String driver = "oracle.jdbc.driver.OracleDriver";
> > Class t = Class.forName (oracle.jdbc.driver.OracleDriver);
> >
> > try {
> > Connection conn = DriverManager.getConnection
> > ("jdbc:oracle:thin:@servername:1521:ORCL", "Scott", "Tiger");
> >
> > // Create a Statement
> > Statement stmt = conn.createStatement ();
> >
> > // Select the ENAME column from the EMP table
> > ResultSet resset = stmt.executeQuery ("select NAME from EMPLOYEES");
> >
> > // Iterate through the result and print the employee names
> > // while (resset.next())
> > // System.out.println (resset.getString (1));
> > } catch (SQLException ex) {}
> >
> > }
> >
> >
> > When I try to compile it with JDK 1.1.8 The error message is:
> >
> > SimpleServlet.java:47: Type expected.
> > try {
> > ^
> > 1 error
> >
> >
> > Similar thing with an applet works like it should...
> >
> >
> > Ari Kukkonen
> >
> > --
> > Konecranes Components Corporation
> > IT Technician
> > E-Mail: [EMAIL PROTECTED]
> > Phone: +358 20 427 2232 Cellphone: +358 40 747 7537
> > --
> > "If everything seems to be going well, you have obviously overclocked
> something."
> >
> >
> ___________________________________________________________________________
> > 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
>
> ___________________________________________________________________________
> 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
___________________________________________________________________________
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