aspose file tools*
The moose likes Servlets and the fly likes JDBC - JSP help required. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "JDBC - JSP help required." Watch "JDBC - JSP help required." New topic
Author

JDBC - JSP help required.

Suresh Selvaraj
Ranch Hand

Joined: Nov 14, 2000
Posts: 104
Hi,
I 've developed a JSP that accesses Oracle database. I get an error stating "oracle.jdbc.driver.OracleDriver" not found.
Here are the statements...
<%@ page import="java.io.*, javax.servlet.jsp.*, java.sql.*" %>
<%@ page import="java.net.*, javax.servlet.jsp.*, javax.servlet.* " %>
<%@ page import="javax.servlet.http.*" %>
<%@ page import="oracle.jdbc.driver.*" %>
<h4>Metrics Report Generation System</h4>
<%
Class.forName("oracle.jdbc.driver.OracleDriver");
//DriverManager.registerDriver( new oracle.jdbc.driver.OracleDriver() );
Connection con;
// con=DriverManager.getConnection("jdbc racle ci8:@", "userID", "PSWD");
con=DriverManager.getConnection("jdbc racle:thin:@st052:1521:ORCL", "userID", "PSWD");
I am using Javawebserver2.0 just for Testing this application.
The classpaths have SERVLET.jar and JSP.jar.
I even tried to create a jar file containing the oracle driver classes and concatenated to the above mentioned class path but I still get the same error.
Can anybody help in solving this problem.
Thanks in advance,
Suresh Selvaraj

Suresh Selvaraj, (author of JQuiz)<br />SCJP2<br /><a href="http://www.decontconsulting.com" target="_blank" rel="nofollow">www.decontconsulting.com</a>
Bhupinder Dhillon
Ranch Hand

Joined: Oct 12, 2000
Posts: 124
Put your driver zip file in the <server-root>/lib directory and restart the server.
Suresh Selvaraj
Ranch Hand

Joined: Nov 14, 2000
Posts: 104
Hi Bhupinder,
Thanks for your reply. Your suggestion was helpful and I was able to access the oracle database thru. JSP/JDBC
Thanks,
Suresh Selvaraj
 
wood burning stoves
 
subject: JDBC - JSP help required.