This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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 Elasticsearch in Action this week in the Big Data 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: 62142

Moved to the JDBC forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Connecting to database from JSP through JDC