There r 2 ways of telling the server where to find the JDBC driver
1. either extract the classes111.zip into one of the subdirectory which is
included inthe classpath of the server OR
2. include the classes111.zip in the classpath of jserv
regards
narendra
Jeetandra Mahtani wrote:
> I had a similar problem too. I was using the
> com.ibm.as400.access.AS400JDBCDriver and the servlet
> couldn't find it. I copied and pasted the com folder
> into my apps servlers servlet root directory and that
> took care of it. You definitely have the oracle
> driver and you just need to make sure the servlet can
> find it.
> Hope this helps.
> J
>
> ---Balogh Andras <[EMAIL PROTECTED]> wrote:
> >
> > -----Original Message-----
> > From: Spencer Tasker <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> <[EMAIL PROTECTED]>
> > Date: Sunday, April 11, 1999 7:46 PM
> > Subject: JDBC from Servlet (doPost)
> >
> >
> > >Hi,
> > >
> > >I have written a sample simple servlet (with
> doPost method - since I would
> > >want to pass a parameter back from a form in the
> real version of the
> > >servlet) which is supposed to use JDBC to access
> an oracle database and
> > pull
> > >back a bit of data. Unfortunately, it fails to
> work, telling me that it
> > >cannot find the JDBC driver, failing on the line
> > >
> > >
> Class.forName("oracle.jdbc.driver.OracleDriver");
> > >
> > >Full error messages follow�at end of message.
> > >
> > >When I rewrite this simple servlet as an
> application it runs 100% OK.
> > >
> > >I have attached the 2 servlet & application source
> files in case anyone is
> > >interested, but I'm lost as to why I can't get
> hold of the database from
> > the
> > >servlet. This must be a common situation, but I
> haven't found it mentioned
> > >anywhere.
> > >
> > >For what its worth I'm running Apache Jserv.
> >
> > The problem is that your jdbc. driver classes
> should be copied somewhere.
> > I think in the Apache directory near servlets.
> > If you have it in a zip you should unzip it but
> this is not the best
> > solution.
> >
> > The application uses CLASSPATH to find the diver
> but servlets don't
> > use it. So you sholud check how to set thet
> classpath for Jserv.
> > Sorry with that i can't help.
> >
> > p.s. It has to work somehow it's nothing wrong with
> the servlet .
> >
> >
> > Best wishes,
> > Andras
> > >
> > >Thanks in advance,
> > >- Spencer
> > >
> > >
> > >
> > >
> > >ERROR MESSAGES--------------------------------
> > >Unable to load JDBC driverException: null
> <<< from my code
> > >java.sql.SQLException: No suitable driver
> > > at
> java.sql.DriverManager.getConnection(DriverManager.java:111)
> > > at
> java.sql.DriverManager.getConnection(DriverManager.java:149)
> > > at dbtestServlet.doPost(dbtestServlet.java:52)
> > > at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:521)
> > > at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
> > > at
> org.apache.jserv.JServConnection.run(JServConnection.java:359)
> > > at java.lang.Thread.run(Thread.java)
> > >Unable to read derivation: No suitable driver
> <<< from my code
> > >
> > >
> >
> >
> ___________________________________________________________________________
> > 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!?
> Get your free @yahoo.com address at http://mail.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
___________________________________________________________________________
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