oracle connection with jsp application

oracle United States
  • 15 years ago

    i am in a great problem;
    plz help me to solve it
    i am running tomcat server 5.028 on my machinewhich is running jsp pages
    but it is not connecting with oracle so that exchange of data can occur plz help me how shall i sort out this problem
    i am using this following code to establish connection in my java classes


     public void establishConnection ( ){
       try {
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ; // loading class for database connection driver
         accBookConnection = DriverManager.getConnection("jdbc:odbc:system","scott","tiger") ; // opening DSN
         accBookStatement = accBookConnection.createStatement() ; // statement to execute queries
         //System.out.println("connection establish");
       }


       catch (Exception e) {
         e.printStackTrace() ; // printing exception trace
       }
     }
    NOTE:- system is the instance name in odbc32

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“God could create the world in six days because he didn't have to make it compatible with the previous version.”