Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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
Posts: 65653
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the JDBC forum.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!