Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connecting to database from JSP through JDC

 
Mohan Ravi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Table:Student
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.

Thanks
MR
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After reading the following, try yourself and post again when you have problems. Good luck.

http://faq.javaranch.com/view?GeneralJdbcQuestions
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64858
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the JDBC forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic