File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Head First Android this week in the Android 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: 63057

Moved to the JDBC forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: Connecting to database from JSP through JDC
It's not a secret anymore!