File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

JDBC - JSP help required.

Suresh Selvaraj
Ranch Hand

Joined: Nov 14, 2000
Posts: 104
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="*, javax.servlet.jsp.*, java.sql.*" %>
<%@ page import="*, javax.servlet.jsp.*, javax.servlet.* " %>
<%@ page import="javax.servlet.http.*" %>
<%@ page import="oracle.jdbc.driver.*" %>
<h4>Metrics Report Generation System</h4>
//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="" target="_blank" rel="nofollow"></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
Suresh Selvaraj
I agree. Here's the link:
subject: JDBC - JSP help required.
jQuery in Action, 3rd edition