Resin Server with Oracle
843835Mar 5 2002 — edited Mar 5 2002I am trying to connect to an Oracle database with JSP.I am using a Resin server and not tomcat.I am having servlet errors with the JSP and i was just wondering if it was because i have to set some paths to resin or is it the code(I dont think it is). cheers and also thanks for the help with the other database problem
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%
try
{
//First, instantiate variables we will use
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
//Load the JDBC driver
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
//Get the connection
conn = DriverManager.getConnection("jdbc:odbc:Personal","Scott","Tiger");
stmt = conn.createStatement();
//my sql statement
rs = stmt.executeQuery("select blah, blah from blah_tbl");
}
catch ( Exception e )
{
throw e;
}
%>