I don't think I'm explaining this correctly.
You have to have place
c:\orant\jdbc\classes102.zip
in the CLASSPATH.
Just having c:\orant\jdbc in your path WILL NOT WORK.
The path environment variable you are setting CANNOT be the system PATH, but
must be the CLASSPATH. You can usually set the classpath for for the
servlet engine in its setup configuration.
Thor HW
----- Original Message -----
From: Moloy Biswas <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 17, 2000 10:53 PM
Subject: Re: Pl help
> Hello
>
> I have classes102.zip in orant/jdbc directory which is in the path. But
still it
> is giving the same problem. My servlets is in the servlet directory of
the
> JavaWebServer. I am calling the servlet from a clients computer through a
> browser. The error it is showing is
>
> Could not load the database driver: Unable to find class
> oracle.jdbc.driver.OracleDriver
>
>
> Please help
>
> Moloy
>
>
> Thor HW wrote:
>
> > You're missing your classes.zip file is missing from your Servlet
engines
> > classpath.
> > The file might be classes111.zip, or something of that form. Just do a
> > little search in your orant directory for classes*zip
> >
> > Thor HW
> > ----- Original Message -----
> > From: Moloy Biswas <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, February 17, 2000 12:00 AM
> > Subject: Pl help
> >
> > > I am getting error while running a servlet. I am having Oracle 8.0.5
on
> > > Win NT. Compilation of the .java file gives no error .... the error is
> > >
> > > ** Could not load the database driver: Unable to find class
> > > oracle.jdbc.driver.OracleDriver
> > >
> > > Please help
> > > (Attaching the .java file)
> > >
> > >
> > > Moloy
> > >
> > >
> > >
> >
>
> --------------------------------------------------------------------------
--
> > ----
> >
> > > import java.io.*;
> > > import java.sql.*;
> > > import java.math.*;
> > > import javax.servlet.*;
> > > import javax.servlet.http.*;
> > >
> > > public class mservlet1 extends HttpServlet
> > > {
> > > public void doGet(HttpServletRequest req, HttpServletResponse
res)
> > > throws ServletException, IOException
> > > {
> > > Connection con = null;
> > > Statement stmt = null;
> > > ResultSet rs = null;
> > >
> > > res.setContentType("text/html");
> > > PrintWriter out = res.getWriter();
> > >
> > > try
> > > {
> > > file://Load and therefore register the driver
> > >
Class.forName("oracle.jdbc.driver.OracleDriver");
> > >
> > > file://Get connection to the database
> > > con =
> >
DriverManager.getConnection("jdbc:oracle:thin:@sreint:1521:ORCL","moloy","mo
> > loy");
> > >
> > > file://Create a statement object
> > > stmt = con.createStatement();
> > >
> > > file://Execute an SQL query, get a ResultSet
> > > rs = stmt.executeQuery("SELECT FNAME,LNAME
FROM
> > CONTACT");
> > >
> > > file://Display the result set as a list
> > > out.println("<HTML><HEAD><TITLE>Moloy's
> > list...</TITLE></HEAD>");
> > > out.println("<BODY><UL>");
> > > while(rs.next())
> > > {
> > > out.println("<LI>" +
rs.getString("fname")
> > + " " + rs.getString("lname"));
> > > }
> > > out.println("</UL>");
> > > out.println("</BODY></HTML>");
> > > }
> > > catch (ClassNotFoundException e)
> > > {
> > > out.println("Could not load the database
driver: "
> > + e.getMessage());
> > > }
> > > catch (SQLException e)
> > > {
> > > out.println("SQLException caught: " +
> > e.getMessage());
> > > }
> > > finally
> > > {
> > > file://Close all database connection.
> > > try
> > > {
> > > if (con != null)
> > > con.close();
> > > }
> > > catch (SQLException e)
> > > {
> > > out.println("SQLException caught: " +
> > e.getMessage());
> > > }
> > > }
> > > }
> > > }
> > >
> >
> >
___________________________________________________________________________
> > 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
>
>
> --------------------------------------------------------------
> SREI INTERNATIONAL FINANCE LTD., CALCUTTA, INDIA
>
>
___________________________________________________________________________
> 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