I am able to connect to Oracle 10g (using ojdbc14.jar driver) with java. But when I use the same code in a servlet or file with .jsp extension, I am getting class not found exception. I am not able to understand why this is happening. Do we have different connection strings for JDBC in java and jsp? This is what I use to connect to oracle iwith both, java and jsp:
Class.forName("oracle.jdbc.OracleDriver");
String url = "jdbc:oracle:thin:@localhost:1521:xe";
//Xe being the database name
String usr = "username";
String pwd = "pwd";
Works fine with java but gives error with jsp.