I am developing a págia that will be a member of the company's website.
On this page I need some data that are on our basis of the Management System.
But not Esotu able to connect with the database.
I was using Dreamweaver only, and when testing on the server no data was displayed and did not return any errors, and Quety returned records.
later, I started using NetBeans and debugga I saw that it was something related to the driver, because there I did an exception and returns this error:
Oracle.jdbc.driver.oracledriver
The problem is that only iso does not mediate much, lol.
I downloaded the driver and copied it to the Tomcat lib folder (use version 6).
Has anyone ever had any seemed like, or do you have any idea what might be the mistake?
follows the excerpt from the Code for Coenxão with the Bank:
<%
String JDBC_DRIVER = "oracle.jdbc.driver.OracleDriver";
String DB_URL = "jdbc:oracle:@192.168.7.1:1521:PROD";
String DB_USER = "website";
String DB_PASS = "siteweb";
Connection connection = null;
try {
Class.forName(JDBC_DRIVER).newInstance();
connection = DriverManager.getConnection(DB_URL, DB_USER, DB_PASS);
out.println("Conexão realizada com sucesso.");
}
catch (Exception e){
out.println("Erro ao acessar banco de dados!<BR>" + e.getMessage());
} finally {
out.println(" ");
}
%>