Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

unable to connect to mysql using jsp

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to connect to MYSQL using jsp and i have included the jar file "mysql-connector-java-3.1.14-bin" in the lib folder.But still I am getting an exception "org.apache.jasper.JasperException: com.mysql.jdbc.Driver" Thai is the code :
This is the code for "config.jsp"

Please help me out......
[ January 19, 2008: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Raghuveer,

Welcome to Javaranch

have you included the .jar file in the WEB-INF/lib folder of your deployment? or just you have it in your development environment?

I mean to ask, is the .jar file present in the application/web server where you deployed?
 
Raghuveer Thatavarthy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have included the .jar file in the WEB-INF\lib folder
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is true. But is this WEB-INF/lib folder you mention is of the server where you deploy? Or just inside your development environment?

You need to have the lib file inside the deployed application as well so that at runtime, the web container can find that library to load the classes required.

Having the libraries inside the WEB-INF/lib of the concerned application is one kind. Other way is you have these libraries in the area/location where the particular web/application server usually picks up from when it is getting started.
 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what error do you get?
 
Evildoers! Eat my justice! And this tiny ad's justice too!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic