Servlet JDBC Woes

From: Isaac Kohane <gasp_at_medg.lcs.mit.edu>
Date: 1998/12/28
Message-ID: <3688184A.190B2729_at_medg.lcs.mit.edu>#1/1


The piece of code below works just fine when inserted into an applet framework but although it compiles in the servelet class framework, it generates the following error:(see the one catch statement in the snippet below).

Java.lang.ClassNotFoundException

I set my paths the same in the Macintosh Visual Cafe environment for both applet and servlet but only the applet version seems to work. I am using the Macintosh Webstart server with JRUN. Any hints?

Thanks,

-Zak

public
class HelloDatabaseWorldServlet extends HttpServlet {

    public void doGet (HttpServletRequest req, HttpServletResponse res)  throws ServletException, IOException

    {
 res.setContentType("text/html");

 ServletOutputStream out = res.getOutputStream();  String connect_string_goldminer =
"jdbc:oracle:thin:_at_foobar.harvard.edu:1521:orcl";

  //try loggin on - if fails, throws exception   try {

      // This is for Oracle Thin driver
      DriverManager.registerDriver(new

oracle.jdbc.driver.OracleDriver());

}

     catch (java.lang.Exception ex) {
      out.println("Error 1: " + ex);

}

    }  

} Received on Mon Dec 28 1998 - 00:00:00 CET

Original text of this message