jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes Connecting to database from JSP through JDC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connecting to database from JSP through JDC" Watch "Connecting to database from JSP through JDC" New topic

Connecting to database from JSP through JDC

Mohan Ravi

Joined: Jun 07, 2006
Posts: 1
Hi All,

Can you please help me as I am new to this tomcat and jsp

For example if I have a database(datasource):StudentProfile
Columns: StudentNo, Student_FirstName, Student_LastName, Student_Grade

1. How do I connect to the DB from this student.jsp
2. Display all the records (Select * from Student)
3. how do I update the grade. (Update Student set Student_Grade = ? where studentNo = ?)

Please help me.

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

After reading the following, try yourself and post again when you have problems. Good luck.


[My Blog]
All roads lead to JavaRanch
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63551

Moved to the JDBC forum.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: Connecting to database from JSP through JDC
It's not a secret anymore!