help,,, im sori i don't know what category to put my problem with, but all i know is that i put 'oracle.jdbc.driver.OracleDriver' into a
jsp page so thats the reason why i put it here on this forum... oh my, im stuck here for a week...
okay,,, so here's my problem.. i don't know how to explain this but here goes...
in my jsp page,,, i wanted to connect to oracle database and access the data inside it... this is what i did in my jsp page...
<%@ page language="java" import="java.io.*, java.util.*, java.lang.reflect.Array, java.sql.*" %>
<%@ page language="java" import=" oracle.jdbc.driver.OracleDriver, oracle.jdbc.driver.OracleResultSet"%>
Connection conn = null; // current db connection
try {
String username="scott";
String password="tiger";
String oracleport="1521";
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection("jdbc
racle:thin:@Table:"+oracleport+":"+nene,username,password);
conn.setAutoCommit(false);
GetData();
} catch (SQLException e){
} finally { CloseConnection();
}
*let's just assume that the functions GetData() and CloseConnection() are error free and they correct fully functioning well,
'GetData()' is the function where it gets all the data from the oracle database and put it into an jspVariablearray,
'CloseConnection()' is a function where it closes the database, -->
when i run the page, there is no
servlet exception that appear, but when i checked the values from the generated html code, it shows that its values are zero...
my guess in the problem is that it didn't connect from the database because i did a class of this whole code from a
java file lets named it Database.java, when i compiled and debug Database.java in the software Sun One and Forte, it had accessed the values from the oracle database, it is just in the jsp page that it didn't accessed the values...
i saw two things that could have been the problem why it didn't connect in the database, 1) from the page import i extracted OracleDriver.class and OracleResultSet.class in its .zip file namely classes12.zip my friend told me that it shouldn't not been extracted from the .zip file but he didn't know why... i don't how to import a .zip file to a page...
2) is that i don't know if
conn = DriverManager.getConnection("jdbc
racle:thin:@Table:"+oracleport+":"+nene,username,password);
is the correct method of connecting to the oracle database from a jsp page....
so this is where i need help from you guys..
a) how to import .zip file to a jsp page...
b) is there any other method to connect to an oracle database from a jsp page?
c) is my theory correct? that my problem is the connection of database?
d) did you understand my problem?
thanks in advance guys,,, i know you can do it!