I am trying to access Oracle from
JSP and my .jsp file is as below, I am getting class not found exception...am I missing something? I am using appropriate username,password,host and sid parameters.
<%@ page import="java.sql.*" %>
<HTML>
<HEAD>
<Title>Listing The Contents Of a Database Table</Title>
</Head>
<Body>
<p>Content of the Employee Table:
<Table Border=1 Cellpadding=0 Cellspacing=0>
<TR>
<TD> ID </TD>
<TD> Name </TD>
<TD> SSN </TD>
</TR>
<%
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc
racle:thin:@<host>:<1521>:<sid>","<username>","<password>");
java.sql.Statement statement = conn.createStatement();
java.sql.ResultSet columns = statement.executeQuery("Select * from employee");
while (columns.next()) {
int ID = columns.getInt("ID");
String Name = columns.getString("Name");
int SSN = columns.getInt("SSN");
%>
<TR> <TD> <%= ID %> </TD>
<TD> <%= Name %> </TD>
<TD> <%= SSN %> </TD>
</TR>
<% } %>
</Table>
</Body>
</HTML>