• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to connect the mysql data base through JSP in Eclipse?

 
mahant Awati
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




How to connect the mysql data base through JSP in Eclipse ? i need small example code related to db connectivity ?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34656
366
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch! Your IDE is just the place you type. Since this is a coding question about databases, I'm going to move it to our JDBC forum. Where you will likely be suggested to have the database code in a Java class rather than a JSP. JSPs are meant for displaying info.
 
Epifanio Guzman
Greenhorn
Posts: 16
Chrome Fedora MyEclipse IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi my friend.

I explain to web application. The same way to simple java project.

1.- download Jdbc jar, EJ. mysql-connector-java-5.1.7-bin.jar from verndor page. same way for MSSQL server, Oracle, etc
http://dev.mysql.com/downloads/connector/j/

1.- create new project
2.- build path > configure buil path > Libraries... > Add external jar > mysql-connector-java-5.1.7-bin.jar > open
this step attach lib to /WEB-INF/lib/
3.- create classes
http://www.clubdesarrolladores.com/articulos/mostrar/61-jdbc-y-mysql

i hope this information to serve you like base.
 
sarath j nair
Greenhorn
Posts: 11
Chrome Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
build path > configure buil path > Libraries > Add external jar > mysql-connector-java-5.1.7-bin.jar >

open this step attach lib toproject /WEB-INF/lib/

The lib file is very importannt to connect with DB...

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic