Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

unable to connect to mysql using jsp  RSS feed

 
Raghuveer Thatavarthy
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 ]
 
Raghavan Muthu
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.
 
Ali Khalfan
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what error do you get?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!