The Oracle JDBC drivers are supplied and installed with Oracle JDeveloper
and therefore can be found when your servlet is run.  However, when you
install the servlet on Apache and Jserv, the JDBC drivers cannot be found
hence the exception.  You need to add the JDBC drivers (zip file) to the
jserv config file.  I can't remember what part of the config file you add
them to off the top of my head, but I think that it is something like
wrapper.classpath.

HTH

Lee

> -----Original Message-----
> From: Abhishek Basu Mallick [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, October 23, 2000 11:37 AM
> To:   [EMAIL PROTECTED]
> Subject:      oracle jdbc connection
>
> hi,
> i am having a problem with the code below:
>
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
>
> public class  DBTestAbm extends HttpServlet
> {
>         public void doGet(HttpServletRequest req,HttpServletResponse res)
>         throws ServletException,IOException
>         {
>                 res.setContentType("text/html");
>                 PrintWriter out = res.getWriter();
>
>
>                 try
>                 {
>                         Class.forName("oracle.jdbc.driver.OracleDriver");
>                 }
>                 catch(ClassNotFoundException e)
>                 {
>                         out.println("Abhi : Class not found exception
> given
> : : " + e);
>                 }
>                 out.println("<html>");
>                 out.println("<head><title>Connection to
> database</title></head>");
>                 out.println("<body>");
>                 out.println("<h3>Abhi</h3>");
>                 out.println("</body>");
>                 out.println("</html>");
>                 out.close();
>         }
> }
>
>
>
> When I run this using Oracle JDeveloper it works fine. when i use apache
> jserv to do the same it says
> Abhi : Class not found exception given : :
> java.lang.ClassNotFoundException:
> oracle.jdbc.driver.OracleDriver
>
> can someone tell me whats happening?
> Thanks in advance.
>
>
>
> regards,
> Abhishek BasuMallick
> Cisco Projects
> ZenSar Technologies Ltd.
> --------------------------------------
> What a great time to be a nerd !!
> --------------------------------------
>
> __________________________________________________________________________
> _
> 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

Reply via email to