Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Resin Server with Oracle

843835Mar 5 2002 — edited Mar 5 2002
I 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;
}
%>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 2 2002
Added on Mar 5 2002
2 comments
497 views