aspose file tools*
The moose likes JDBC and the fly likes How to connect the mysql data base through JSP in Eclipse? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to connect the mysql data base through JSP in Eclipse?" Watch "How to connect the mysql data base through JSP in Eclipse?" New topic
Author

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

mahant Awati
Greenhorn

Joined: Jan 16, 2012
Posts: 6




How to connect the mysql data base through JSP in Eclipse ? i need small example code related to db connectivity ?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30548
    
152

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Epifanio Guzman
Greenhorn

Joined: Jun 24, 2008
Posts: 16

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

Joined: Nov 10, 2011
Posts: 11

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...

 
jQuery in Action, 2nd edition
 
subject: How to connect the mysql data base through JSP in Eclipse?