-2

I am trying to create a connection to my database(oracle), when I put test my code using the main method, it works seamlessly. However, when trying to access it through Tomcat 8, it fails with error: No suitable driver found for "jdbc:oracle:thin:@localhost:1522:xe" I have added ojdbc6 jar file to lib and also configured the built path. The url,use, password is correct still it give the above error. when i paste the same code in main it runs but in tomcat it doesn't.

smith
  • 45
  • 1
  • 8

1 Answers1

1

Put the ojdbc6.jar file in tomcat/lib folder or in your application lib <Aplication>/WEB-INF/lib to get it work.

Vitthal Kavitake
  • 879
  • 5
  • 18