Mark,
 It works!!!!!!!!!   

Thank you very much

Eddie Liang
Database Architect
Phone: 630-810-9669 x253


-----Original Message-----
From: Wagoner, Mark [mailto:MWagoner@;wild-flavors.com] 
Sent: Friday, October 18, 2002 11:22 AM
To: 'Tomcat Users List'
Subject: RE: Oracle jdbc driver not found

If you are using the ROOT context for your app then, yes.  If you don't know
what I mean by "ROOT context" then you probably are so the answer is still
yes.  ;o)

There should be a classes and a lib directory there by default.  If not, go
ahead and create one.

-----Original Message-----
From: Eddie Liang [mailto:eliang@;edge.com]
Sent: Friday, October 18, 2002 12:13 PM
To: 'Tomcat Users List'
Subject: RE: Oracle jdbc driver not found


Mark,
    Thanks for the quick reply. When you said "WEB-INF/lib" directory, is
that mean "%catalina_home%\webapps\ROOT\WEB-INF\lib"? If there is not lib
subdirectory under "%catalina_home%\webapps\ROOT\WEB-INF\", could I create
one and put ojdbc14.jar in it?

Thank you

Eddie Liang
Database Architect
Phone: 630-810-9669 x253


-----Original Message-----
From: Wagoner, Mark [mailto:MWagoner@;wild-flavors.com] 
Sent: Friday, October 18, 2002 11:03 AM
To: 'Tomcat Users List'
Subject: RE: Oracle jdbc driver not found

Tomcat does not use the classpath and, since you are using JDK 1.4, you only
need ojdbc14.jar (the zip files are for older versions of Java).  Put the
jar file in the WEB-INF/lib directory of your web app.  Tomcat will
automatically load it from there.

-----Original Message-----
From: Eddie Liang [mailto:eliang@;edge.com]
Sent: Friday, October 18, 2002 11:58 AM
To: 'Tomcat Users List'
Subject: Oracle jdbc driver not found


 

 

Hello,

  I have a problem for creating a simple database connection with JSP,
tomcat 4.0.4, jdk1.4. I set the oracle jdbc driver ( class111,zip,
class12.zip, ojdbc14.jar) in the classpath.  Tomcat still complaint the
driver is not found. Here is the error that I got. Does anybody know I need
to configure something in the tomcat?

 

Thank you

 

org.apache.jasper.JasperException: Unable to compile class for JSPNote:
sun.tools.javac.Main has been deprecated.
 
 
An error occurred between lines: 35 and 58 in the jsp file:
/JSP/com/imedge/admin/test.jsp
 
Generated servlet error:
C:\Tomcat
4.0\work\Standalone\localhost\_\JSP\com\imedge\admin\test$jsp.java:101:
Class oracle.jdbc.driver.OracleDriver not found.
                    DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
                                                                       ^
1 error, 1 warning
 
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
        at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:176)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:188)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        
 
Here is my source code:
 

<!-- Developed and Documented by Krishna Veeramachaneni -->

<html>

 

<head>

<title>IMEDGE Content Management Services Administrator</title>

<link href="/JSP/com/imedge/admin/style.css" rel="stylesheet"
type="text/css" >

<script language="JavaScript"
src="/JSP/com/imedge/admin/validation.js"></script>

<script language="JavaScript"
src="/JSP/com/imedge/admin/CascadeMenu.js"></script>

<script language = "JavaScript">

 

<!-- hide me

 

 

// show me -->

 

</script>

</head>

<% 

       

      /* Java code to retrieve family name and description if any */

      

 

      

%>

<body  link="#990000" vlink="#009999" alink="#009999"  

ID="Bdy" leftmargin="0" rightmargin="0" topmargin="0" bgcolor="beige" >

 

<%@ include file="/JSP/com/imedge/admin/Banner.jsp" %>

<%@ include file="/JSP/com/imedge/admin/FamilyMenu.jsp"%>

 

<%@ page import="javax.servlet.*" %>

<%@ page import="java.sql.*" %>

 

 

<% 

       

      /* Java code to retrieve family name and description if any */

 

    // Load the Oracle JDBC driver

    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

 

        Connection conn =

      DriverManager.getConnection ("jdbc:oracle:thin:@sunlab2:1521:chcity",

                           "xyzz", "xyzxc");

 

    // Create a Statement

    Statement stmt = conn.createStatement ();

 

    // Select the ENAME column from the EMP table

    ResultSet rset = stmt.executeQuery ("select table_name from
user_tables");

 

    // Iterate through the result and print the employee names

    while (rset.next ())

      System.out.println (rset.getString (1));

      

 

      

%>

            

 

</body>

 

</html>

 

 

Eddie Liang


--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to